mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 04:18:35 +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:
|
||||
# Extract attributes with explicit types
|
||||
model = (
|
||||
getattr(llm_value, "model_name", None)
|
||||
or getattr(llm_value, "model", None)
|
||||
getattr(llm_value, "model", None)
|
||||
or getattr(llm_value, "model_name", None)
|
||||
or getattr(llm_value, "deployment_name", None)
|
||||
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.
|
||||
"""
|
||||
model_name = (
|
||||
os.environ.get("OPENAI_MODEL_NAME")
|
||||
or os.environ.get("MODEL")
|
||||
os.environ.get("MODEL")
|
||||
or os.environ.get("MODEL_NAME")
|
||||
or os.environ.get("OPENAI_MODEL_NAME")
|
||||
or DEFAULT_LLM_MODEL
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user