Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def on_token_change(user_token):
|
|
17 |
# openai.api_key = user_token
|
18 |
pass
|
19 |
|
20 |
-
def submit_message(
|
21 |
|
22 |
history = state['messages']
|
23 |
|
@@ -134,11 +134,11 @@ with gr.Blocks(css=css) as demo:
|
|
134 |
|
135 |
btn_submit.click(
|
136 |
submit_message,
|
137 |
-
[
|
138 |
[input_message, chatbot, total_tokens_str, state, table])
|
139 |
input_message.submit(
|
140 |
submit_message,
|
141 |
-
[
|
142 |
[input_message, chatbot, total_tokens_str, state, table])
|
143 |
btn_clear_conversation.click(
|
144 |
clear_conversation, [],
|
|
|
17 |
# openai.api_key = user_token
|
18 |
pass
|
19 |
|
20 |
+
def submit_message(prompt, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state):
|
21 |
|
22 |
history = state['messages']
|
23 |
|
|
|
134 |
|
135 |
btn_submit.click(
|
136 |
submit_message,
|
137 |
+
[input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
|
138 |
[input_message, chatbot, total_tokens_str, state, table])
|
139 |
input_message.submit(
|
140 |
submit_message,
|
141 |
+
[input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
|
142 |
[input_message, chatbot, total_tokens_str, state, table])
|
143 |
btn_clear_conversation.click(
|
144 |
clear_conversation, [],
|