File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1010 from tasks .redis_memory import RedisMemory
1111 from tasks .mongo_persistence import MongoPersistence
1212 from tc_temporal_backend .schema .hivemind import HivemindQueryPayload
13+ from tasks .schema import AgentQueryPayload
1314
1415
1516@activity .defn
1617async def run_hivemind_agent_activity (
17- payload : HivemindQueryPayload ,
18+ payload : AgentQueryPayload ,
1819) -> str | None :
1920 """
2021 Activity that instantiates and runs the Crew.ai Flow (AgenticHivemindFlow).
Original file line number Diff line number Diff line change 1+ from pydantic import BaseModel , Field
2+
3+
4+ class AgentQueryPayload (BaseModel ):
5+ community_id : str = Field (
6+ ..., description = "the community id data to use for answering"
7+ )
8+ query : str = Field (..., description = "the user query to ask llm" )
9+ enable_answer_skipping : bool = Field (
10+ False ,
11+ description = (
12+ "skip answering questions with non-relevant retrieved information"
13+ "having this, it could provide `None` for response and source_nodes"
14+ ),
15+ )
16+ chat_id : str = Field (
17+ default = "" ,
18+ description = "the chat id to use for answering" ,
19+ )
You can’t perform that action at this time.
0 commit comments