Spaces:
Running
Running
jonathanjordan21
commited on
Commit
•
6b2e087
1
Parent(s):
989adae
Update custom_llm.py
Browse files- custom_llm.py +0 -2
custom_llm.py
CHANGED
@@ -51,8 +51,6 @@ def custom_chain_with_history(llm, memory):
|
|
51 |
t = ""
|
52 |
for x in memory.chat_memory.messages:
|
53 |
t += f"<|assistant|>\n<s>{x.content}</s>\n" if type(x) is AIMessage else f"<|user|>\n{x.content}\n"
|
54 |
-
# t += f"You: {x.content}\n" if type(x) is AIMessage else f"User: {x.content}\n"
|
55 |
-
print(q)
|
56 |
return "" if len(t) == 0 else t
|
57 |
|
58 |
def format_docs(docs):
|
|
|
51 |
t = ""
|
52 |
for x in memory.chat_memory.messages:
|
53 |
t += f"<|assistant|>\n<s>{x.content}</s>\n" if type(x) is AIMessage else f"<|user|>\n{x.content}\n"
|
|
|
|
|
54 |
return "" if len(t) == 0 else t
|
55 |
|
56 |
def format_docs(docs):
|