jonathanjordan21 commited on
Commit
c80fe35
1 Parent(s): 1466c6e

Update custom_llm.py

Browse files
Files changed (1) hide show
  1. custom_llm.py +1 -1
custom_llm.py CHANGED
@@ -45,7 +45,7 @@ def custom_chain_with_history(llm, memory):
45
  print(len(docs))
46
  return "\n".join([f"{i+1}. {d.page_content}" for i,d in enumerate(docs)])
47
 
48
- return {"chat_history":lambda x:prompt_memory(x['memory'])} | prompt | llm
49
 
50
 
51
  class CustomLLM(LLM):
 
45
  print(len(docs))
46
  return "\n".join([f"{i+1}. {d.page_content}" for i,d in enumerate(docs)])
47
 
48
+ return {"chat_history":lambda x:prompt_memory(x['memory']), "question":lambda x:x['question']} | prompt | llm
49
 
50
 
51
  class CustomLLM(LLM):