Spaces:
Running
Running
Update crewai/agent.py
Browse files- crewai/agent.py +4 -0
crewai/agent.py
CHANGED
|
@@ -69,6 +69,10 @@ class Agent(BaseModel):
|
|
| 69 |
role: str = Field(description="Role of the agent")
|
| 70 |
goal: str = Field(description="Objective of the agent")
|
| 71 |
backstory: str = Field(description="Backstory of the agent")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
llm: Optional[Any] = Field(
|
| 73 |
default_factory=lambda: ChatOpenAI(
|
| 74 |
temperature=0.7,
|
|
|
|
| 69 |
role: str = Field(description="Role of the agent")
|
| 70 |
goal: str = Field(description="Objective of the agent")
|
| 71 |
backstory: str = Field(description="Backstory of the agent")
|
| 72 |
+
api_key: str = Field(
|
| 73 |
+
default=os.getenv("OPENAI_API_KEY"),
|
| 74 |
+
description="API key for the language model.",
|
| 75 |
+
)
|
| 76 |
llm: Optional[Any] = Field(
|
| 77 |
default_factory=lambda: ChatOpenAI(
|
| 78 |
temperature=0.7,
|