Skip to content

Commit 5430add

Browse files
authored
Merge pull request #40 from TogetherCrew/feat/34-aqc-reasoning
feat: separate agent payload from hivemind payload!
2 parents 79db7d9 + 97e18dc commit 5430add

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

tasks/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
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
1617
async 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).

tasks/schema.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
)

0 commit comments

Comments
 (0)