mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
standardize on LLM_MODEL (#244)
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user