Skip to content

Commit 20fc9f9

Browse files
committed
typing
1 parent 1843a05 commit 20fc9f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

willa/chatbot/graph_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Manages the shared state and workflow for Willa chatbots."""
2-
from typing import Any, Optional, Annotated, NotRequired
2+
from typing import Optional, Annotated, NotRequired
33
from typing_extensions import TypedDict
44

55
from langchain_core.language_models import BaseChatModel
@@ -22,7 +22,7 @@ class WillaChatbotState(TypedDict):
2222
messages_for_generation: NotRequired[list[AnyMessage]]
2323
search_query: NotRequired[str]
2424
tind_metadata: NotRequired[str]
25-
documents: NotRequired[list[Any]]
25+
documents: NotRequired[list[dict[str, str]]]
2626

2727

2828
class GraphManager: # pylint: disable=too-few-public-methods
@@ -91,7 +91,7 @@ def _prepare_search_query(self, state: WillaChatbotState) -> dict[str, str]:
9191

9292
return {"search_query": search_query}
9393

94-
def _retrieve_context(self, state: WillaChatbotState) -> dict[str, str | list[Any]]:
94+
def _retrieve_context(self, state: WillaChatbotState) -> dict[str, str | list[dict[str, str]]]:
9595
"""Retrieve relevant context from vector store."""
9696
search_query = state.get("search_query", "")
9797
vector_store = self._vector_store

0 commit comments

Comments
 (0)