jonathanjordan21 commited on
Commit
1bd9a8f
·
verified ·
1 Parent(s): 26ff4af

Update custom_llm.py

Browse files
Files changed (1) hide show
  1. custom_llm.py +2 -2
custom_llm.py CHANGED
@@ -276,7 +276,7 @@ def custom_combined_chain(llm, df_chain, memory_chain):
276
  {question}
277
  </question>
278
 
279
- Do not respond with more than two words.
280
 
281
  </s></INST>""")
282
 
@@ -289,7 +289,7 @@ def custom_combined_chain(llm, df_chain, memory_chain):
289
 
290
  # full_chain = RunnablePassthrough.assign(topic= (prompt | llm)) | RunnableLambda(route)
291
  # combined_chain = prompt | llm
292
- return RunnablePassthrough.assign(topic=prompt | llm) | RunnableBranch( (lambda x: "ticket" in x['topic'].lower(), df_chain), (lambda x: "dataframe" in x['topic'].lower(), df_chain), memory_chain )
293
 
294
 
295
  class CustomLLM(LLM):
 
276
  {question}
277
  </question>
278
 
279
+ Respond with ONLY one word either "ticket" or "knowledge"
280
 
281
  </s></INST>""")
282
 
 
289
 
290
  # full_chain = RunnablePassthrough.assign(topic= (prompt | llm)) | RunnableLambda(route)
291
  # combined_chain = prompt | llm
292
+ return RunnablePassthrough.assign(topic=prompt | llm) | RunnableBranch( (lambda x: "ticket" in x['topic'].lower(), df_chain), memory_chain )
293
 
294
 
295
  class CustomLLM(LLM):