Spaces:
Sleeping
Sleeping
jonathanjordan21
commited on
Update custom_llm.py
Browse files- 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 |
-
|
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),
|
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):
|