mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-31 15:47:05 +00:00
update config
This commit is contained in:
parent
8af4f5e378
commit
9e7a68349a
@ -2,14 +2,34 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
from pilot.singleton import Singleton
|
||||
from pilot.configs.config import Config
|
||||
|
||||
class AgentManager(metaclass=Singleton):
|
||||
"""Agent manager for managing DB-GPT agents"""
|
||||
"""Agent manager for managing DB-GPT agents
|
||||
In order to compatible auto gpt plugins,
|
||||
we use the same template with it.
|
||||
|
||||
Args: next_keys
|
||||
agents
|
||||
cfg
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.next_key = 0
|
||||
self.agents = {} #TODO need to define
|
||||
self.cfg = Config()
|
||||
|
||||
def create_agent(self):
|
||||
def create_agent(self, task: str, prompt: str, model: str) -> tuple[int, str]:
|
||||
"""Create a new agent and return its key
|
||||
|
||||
Args:
|
||||
task: The task to perform
|
||||
prompt: The prompt to use
|
||||
model: The model to use
|
||||
|
||||
Returns:
|
||||
The key of the new agent
|
||||
"""
|
||||
pass
|
||||
|
||||
def message_agent(self):
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from typing import List
|
||||
|
||||
from auto_gpt_plugin_template import AutoGPTPluginTemplate
|
||||
from pilot.singleton import Singleton
|
||||
|
||||
@ -8,7 +11,22 @@ class Config(metaclass=Singleton):
|
||||
"""Configuration class to store the state of bools for different scripts access"""
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the Config class"""
|
||||
pass
|
||||
|
||||
|
||||
# TODO change model_config there
|
||||
self.debug_mode = False
|
||||
self.execute_local_commands = (
|
||||
os.getenv("EXECUTE_LOCAL_COMMANDS", "False") == "True"
|
||||
)
|
||||
|
||||
self.plugins_dir = os.getenv("PLUGINS_DIR", 'plugins')
|
||||
self.plugins:List[AutoGPTPluginTemplate] = []
|
||||
|
||||
def set_debug_mode(self, value: bool) -> None:
|
||||
"""Set the debug mode value."""
|
||||
self.debug_mode = value
|
||||
|
||||
def set_plugins(self,value: bool) -> None:
|
||||
"""Set the plugins value."""
|
||||
self.plugins = value
|
||||
|
||||
|
11
pilot/model/base.py
Normal file
11
pilot/model/base.py
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from typing import List, TypedDict
|
||||
|
||||
class Message(TypedDict):
|
||||
"""LLM Message object containing usually like (role: content) """
|
||||
|
||||
role: str
|
||||
content: str
|
||||
|
3
pilot/model/chat.py
Normal file
3
pilot/model/chat.py
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding:utf-8 -*-
|
||||
|
Loading…
Reference in New Issue
Block a user