This commit is contained in:
vbarda
2024-10-17 17:52:25 -04:00
parent e674804254
commit 23862cf1ac
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ async def respond_to_general_query(
async def create_research_plan(
state: AgentState, *, config: RunnableConfig
) -> dict[str, list[str]]:
) -> dict[str, list[str] | str]:
"""Create a step-by-step research plan for answering a LangChain-related query.
Args:
@@ -141,7 +141,7 @@ async def create_research_plan(
{"role": "system", "content": configuration.research_plan_system_prompt}
] + state.messages
response = cast(Plan, await model.ainvoke(messages))
return {"steps": response["steps"]}
return {"steps": response["steps"], "documents": "delete"}
async def conduct_research(state: AgentState) -> dict[str, Any]:
+1 -1
View File
@@ -61,7 +61,7 @@ def reduce_docs(
if item_id not in existing_ids:
new_list.append(
Document(**item, metadata={**metadata, "uuid": item_id})
Document(**{**item, "metadata": {**metadata, "uuid": item_id}})
)
existing_ids.add(item_id)