Update app.py
Browse files
app.py
CHANGED
|
@@ -10,12 +10,13 @@ from langchain.chains import ConversationChain
|
|
| 10 |
from langchain.memory import ConversationSummaryMemory
|
| 11 |
from langchain_mistralai.chat_models import ChatMistralAI
|
| 12 |
from langgraph.graph import StateGraph, START, END
|
|
|
|
| 13 |
|
| 14 |
load_dotenv()
|
| 15 |
|
| 16 |
|
| 17 |
class BotState(TypedDict):
|
| 18 |
-
messages: Annotated[List[Dict[str, Any]]]
|
| 19 |
context: str
|
| 20 |
relevant_goods: List[str]
|
| 21 |
should_search: bool
|
|
|
|
| 10 |
from langchain.memory import ConversationSummaryMemory
|
| 11 |
from langchain_mistralai.chat_models import ChatMistralAI
|
| 12 |
from langgraph.graph import StateGraph, START, END
|
| 13 |
+
import operator
|
| 14 |
|
| 15 |
load_dotenv()
|
| 16 |
|
| 17 |
|
| 18 |
class BotState(TypedDict):
|
| 19 |
+
messages: Annotated[List[Dict[str, Any]], operator.add]
|
| 20 |
context: str
|
| 21 |
relevant_goods: List[str]
|
| 22 |
should_search: bool
|