added debug logs
Browse files
server.py
CHANGED
@@ -47,6 +47,7 @@ def chat(
|
|
47 |
end = timer()
|
48 |
print(f"Completed in {end - start:.3f}s")
|
49 |
|
|
|
50 |
resp = ChatResponse(sourceDocs=result["source_documents"])
|
51 |
|
52 |
return json.dumps(resp.dict())
|
@@ -57,7 +58,7 @@ def chat(
|
|
57 |
chat = ChatChain(llm_loader)
|
58 |
uuid_to_chat_chain_mapping[uuid] = chat
|
59 |
result = chat.call_chain({"question": question}, streaming_handler)
|
60 |
-
print(f"result: {result}")
|
61 |
|
62 |
resp = ChatResponse(sourceDocs=[])
|
63 |
return json.dumps(resp.dict())
|
|
|
47 |
end = timer()
|
48 |
print(f"Completed in {end - start:.3f}s")
|
49 |
|
50 |
+
print(f"qa_chain result: {result}")
|
51 |
resp = ChatResponse(sourceDocs=result["source_documents"])
|
52 |
|
53 |
return json.dumps(resp.dict())
|
|
|
58 |
chat = ChatChain(llm_loader)
|
59 |
uuid_to_chat_chain_mapping[uuid] = chat
|
60 |
result = chat.call_chain({"question": question}, streaming_handler)
|
61 |
+
print(f"chat result: {result}")
|
62 |
|
63 |
resp = ChatResponse(sourceDocs=[])
|
64 |
return json.dumps(resp.dict())
|