mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
include model_name (#2310)
This commit is contained in:
committed by
GitHub
parent
a1f35e768f
commit
59c6c29706
@@ -43,8 +43,8 @@ def create_llm(
|
|||||||
try:
|
try:
|
||||||
# Extract attributes with explicit types
|
# Extract attributes with explicit types
|
||||||
model = (
|
model = (
|
||||||
getattr(llm_value, "model_name", None)
|
getattr(llm_value, "model", None)
|
||||||
or getattr(llm_value, "model", None)
|
or getattr(llm_value, "model_name", None)
|
||||||
or getattr(llm_value, "deployment_name", None)
|
or getattr(llm_value, "deployment_name", None)
|
||||||
or str(llm_value)
|
or str(llm_value)
|
||||||
)
|
)
|
||||||
@@ -77,8 +77,9 @@ def _llm_via_environment_or_fallback() -> Optional[LLM]:
|
|||||||
Helper function: if llm_value is None, we load environment variables or fallback default model.
|
Helper function: if llm_value is None, we load environment variables or fallback default model.
|
||||||
"""
|
"""
|
||||||
model_name = (
|
model_name = (
|
||||||
os.environ.get("OPENAI_MODEL_NAME")
|
os.environ.get("MODEL")
|
||||||
or os.environ.get("MODEL")
|
or os.environ.get("MODEL_NAME")
|
||||||
|
or os.environ.get("OPENAI_MODEL_NAME")
|
||||||
or DEFAULT_LLM_MODEL
|
or DEFAULT_LLM_MODEL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user