mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-12 13:00:42 +08:00
decrease amount of info logged
also add disclaimer on front-end.
This commit is contained in:
+12
-9
@@ -153,23 +153,26 @@ def talk_to_robot(index, query: str, history: List[Dict[str, str]], k: int = STA
|
||||
|
||||
|
||||
t2 = time.time()
|
||||
log("Time to get response: ", t2 - t1, " s")
|
||||
print("Time to get response: ", t2 - t1, " s")
|
||||
|
||||
if DEBUG_PRINT:
|
||||
log('\n' * 10)
|
||||
log(" ------------------------------ prompt: -----------------------------")
|
||||
print('\n' * 10)
|
||||
print(" ------------------------------ prompt: -----------------------------")
|
||||
for message in prompt:
|
||||
log(f"----------- {message['role']}: ------------------")
|
||||
log(message['content'])
|
||||
print(f"----------- {message['role']}: ------------------")
|
||||
print(message['content'])
|
||||
|
||||
log('\n' * 10)
|
||||
print('\n' * 10)
|
||||
|
||||
log(" ------------------------------ response: -----------------------------")
|
||||
log(response)
|
||||
print(" ------------------------------ response: -----------------------------")
|
||||
print(response)
|
||||
|
||||
log(query)
|
||||
log(response)
|
||||
|
||||
yield json.dumps({"state": "done"})
|
||||
|
||||
except Exception as e:
|
||||
log(e)
|
||||
print(e)
|
||||
yield json.dumps({"state": "error", "error": str(e)})
|
||||
|
||||
|
||||
@@ -385,6 +385,12 @@ const Home: NextPage = () => {
|
||||
</Head>
|
||||
<main>
|
||||
<Header page="index" />
|
||||
|
||||
<p><b>
|
||||
Since this is still an early test, all questions and answers are stored.<br/>
|
||||
Zero other information is collected.
|
||||
</b></p>
|
||||
|
||||
<ul>
|
||||
{entries.map((entry, i) => {
|
||||
if (entry.role === "user") {
|
||||
|
||||
Reference in New Issue
Block a user