jonathanjordan21
commited on
Commit
•
af175db
1
Parent(s):
8776349
Update custom_llm.py
Browse files- custom_llm.py +1 -1
custom_llm.py
CHANGED
@@ -129,7 +129,7 @@ def custom_chain_with_history(llm, memory):
|
|
129 |
# )
|
130 |
|
131 |
# return {"chat_history":prompt_memory, "context":asyncio.run(create_vectorstore()).as_retriever(search_type="similarity", search_kwargs={"k": 12}) | format_docs, "question": RunnablePassthrough()} | prompt | llm
|
132 |
-
return {"chat_history":lambda x:prompt_memory(x['memory']), "context":itemgetter("question") | asyncio.run(create_vectorstore()).as_retriever(search_type="similarity", search_kwargs={"k":
|
133 |
|
134 |
|
135 |
|
|
|
129 |
# )
|
130 |
|
131 |
# return {"chat_history":prompt_memory, "context":asyncio.run(create_vectorstore()).as_retriever(search_type="similarity", search_kwargs={"k": 12}) | format_docs, "question": RunnablePassthrough()} | prompt | llm
|
132 |
+
return {"chat_history":lambda x:prompt_memory(x['memory']), "context":itemgetter("question") | asyncio.run(create_vectorstore()).as_retriever(search_type="similarity", search_kwargs={"k": 12}) | format_docs, "question": lambda x:x['question']} | prompt | llm
|
133 |
|
134 |
|
135 |
|