Skip to content

Commit

Permalink
Merge pull request #1179 from phidatahq/log-sessions-phi-1328
Browse files Browse the repository at this point in the history
Feat: log agent sessions
  • Loading branch information
ashpreetbedi authored Sep 30, 2024
2 parents 0a822d0 + 3a13998 commit e862c0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phi/playground/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def agent_chat(body: AgentRunRequest):
if agent is None:
raise HTTPException(status_code=404, detail="Agent not found")

if body.monitor:
agent.monitoring = True

base64_image: Optional[List[Union[str, Dict]]] = None
if body.image:
base64_image = process_image(body.image)
Expand Down
1 change: 1 addition & 0 deletions phi/playground/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class AgentRunRequest(BaseModel):
message: str
agent_id: str
stream: bool = True
monitor: bool = False
session_id: Optional[str] = None
user_id: Optional[str] = None
image: Optional[UploadFile] = None
Expand Down

0 comments on commit e862c0b

Please sign in to comment.