Spaces:
Sleeping
Sleeping
Commit
·
0261aeb
1
Parent(s):
f35960b
Update main.py
Browse files
main.py
CHANGED
@@ -15,7 +15,7 @@ from langchain.schema import StrOutputParser
|
|
15 |
from langchain.chains.qa_with_sources import load_qa_with_sources_chain
|
16 |
from langchain.vectorstores import Pinecone
|
17 |
import pinecone
|
18 |
-
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
19 |
import pandas as pd
|
20 |
import numpy as np
|
21 |
from anthropic import Anthropic, HUMAN_PROMPT, AI_PROMPT
|
@@ -155,8 +155,7 @@ async def start():
|
|
155 |
|
156 |
########## Chain with streaming ##########
|
157 |
message_history = ChatMessageHistory()
|
158 |
-
memory =
|
159 |
-
k=1,
|
160 |
memory_key="chat_history",
|
161 |
output_key="answer",
|
162 |
chat_memory=message_history,
|
|
|
15 |
from langchain.chains.qa_with_sources import load_qa_with_sources_chain
|
16 |
from langchain.vectorstores import Pinecone
|
17 |
import pinecone
|
18 |
+
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
19 |
import pandas as pd
|
20 |
import numpy as np
|
21 |
from anthropic import Anthropic, HUMAN_PROMPT, AI_PROMPT
|
|
|
155 |
|
156 |
########## Chain with streaming ##########
|
157 |
message_history = ChatMessageHistory()
|
158 |
+
memory = ConversationBufferMemory(
|
|
|
159 |
memory_key="chat_history",
|
160 |
output_key="answer",
|
161 |
chat_memory=message_history,
|