feat: expose agent_id to the messages search api endpoint (#8252)
This commit is contained in:
committed by
Caren Thomas
parent
2d84af11c3
commit
64a1a8b14e
@@ -36982,6 +36982,18 @@
|
||||
"description": "Search mode to use",
|
||||
"default": "hybrid"
|
||||
},
|
||||
"agent_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Agent Id",
|
||||
"description": "Filter messages by agent ID"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"maximum": 100,
|
||||
|
||||
@@ -2310,6 +2310,7 @@ class MessageSearchRequest(BaseModel):
|
||||
class SearchAllMessagesRequest(BaseModel):
|
||||
query: str = Field(..., description="Text query for full-text search")
|
||||
search_mode: Literal["vector", "fts", "hybrid"] = Field("hybrid", description="Search mode to use")
|
||||
agent_id: Optional[str] = Field(None, description="Filter messages by agent ID")
|
||||
limit: int = Field(50, description="Maximum number of results to return", ge=1, le=100)
|
||||
start_date: Optional[datetime] = Field(None, description="Filter messages created after this date")
|
||||
end_date: Optional[datetime] = Field(None, description="Filter messages created on or before this date")
|
||||
|
||||
@@ -73,6 +73,7 @@ async def search_all_messages(
|
||||
actor=actor,
|
||||
query_text=request.query,
|
||||
search_mode=request.search_mode,
|
||||
agent_id=request.agent_id,
|
||||
limit=request.limit,
|
||||
start_date=request.start_date,
|
||||
end_date=request.end_date,
|
||||
|
||||
Reference in New Issue
Block a user