standardize on LLM_MODEL (#244)

This commit is contained in:
Robert Brennan
2024-03-27 09:41:13 -04:00
committed by GitHub
parent 6b4a613578
commit 413f5b1c0b
2 changed files with 3 additions and 3 deletions

View File

@@ -37,6 +37,6 @@ websocat ws://127.0.0.1:3000/ws
```sh
OPENAI_API_KEY=sk-... # Your OpenAI API Key
MODEL_NAME=gpt-4-0125-preview # Default model for the agent to use
LLM_MODEL=gpt-4-0125-preview # Default model for the agent to use
WORKSPACE_DIR=/path/to/your/workspace # Default path to model's workspace
```

View File

@@ -38,7 +38,7 @@ ACTION_TYPE_TO_CLASS: Dict[str, Type[Action]] = {
DEFAULT_WORKSPACE_DIR = os.getenv("WORKSPACE_DIR", os.path.join(os.getcwd(), "workspace"))
MODEL_NAME = os.getenv("MODEL_NAME", "gpt-4-0125-preview")
LLM_MODEL = os.getenv("LLM_MODEL", "gpt-4-0125-preview")
def parse_event(data):
if "action" not in data:
@@ -120,7 +120,7 @@ class Session:
agent_cls = "LangchainsAgent"
if start_event and "agent_cls" in start_event.args:
agent_cls = start_event.args["agent_cls"]
model = MODEL_NAME
model = LLM_MODEL
if start_event and "model" in start_event.args:
model = start_event.args["model"]
if not os.path.exists(directory):