mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
allowing to set model naem through env var
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Any, List, Optional
|
from typing import Any, List, Optional
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ class Agent(BaseModel):
|
|||||||
i18n: I18N = Field(default=I18N(), description="Internationalization settings.")
|
i18n: I18N = Field(default=I18N(), description="Internationalization settings.")
|
||||||
llm: Any = Field(
|
llm: Any = Field(
|
||||||
default_factory=lambda: ChatOpenAI(
|
default_factory=lambda: ChatOpenAI(
|
||||||
model="gpt-4",
|
model=os.environ.get("OPENAI_MODEL_NAME", "gpt-4")
|
||||||
),
|
),
|
||||||
description="Language model that will run the agent.",
|
description="Language model that will run the agent.",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user