Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda committed Oct 17, 2024
1 parent e674804 commit 23862cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/retrieval_graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -141,7 +141,7 @@ class Plan(TypedDict):
{"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]:
Expand Down
2 changes: 1 addition & 1 deletion src/shared/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 23862cf

Please sign in to comment.