From 6b78005529236568641e3ec69f3a04447f084294 Mon Sep 17 00:00:00 2001 From: Bo Date: Mon, 1 Jul 2024 11:28:36 +0800 Subject: [PATCH] . --- API_DEMO_CHAT.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/API_DEMO_CHAT.py b/API_DEMO_CHAT.py index f544ed2..e9e303a 100644 --- a/API_DEMO_CHAT.py +++ b/API_DEMO_CHAT.py @@ -87,13 +87,11 @@ def run_rnn(ctx): return out - -init_ctx = "User: hi" + "\n\n" -init_ctx += "Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it." + "\n\n" - -run_rnn(init_ctx) - -print(init_ctx, end="") +if STATE_NAME == None: # use initial prompt if we are not loading a state + init_ctx = "User: hi" + "\n\n" + init_ctx += "Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it." + "\n\n" + run_rnn(init_ctx) + print(init_ctx, end="") while True: msg = prompt("User: ")