Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,8 +89,8 @@ def chat(api_model, history, system_message, max_tokens, temperature, top_p, top
|
|
| 89 |
def chat_double(history1, history2, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
| 90 |
gen1 = chat(openai.api_model1, history1, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty, openai.api_key1, openai.api_base1)
|
| 91 |
gen2 = chat(openai.api_model2, history2, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty, openai.api_key2, openai.api_base2)
|
| 92 |
-
for
|
| 93 |
-
yield
|
| 94 |
|
| 95 |
start_message = ""
|
| 96 |
|
|
|
|
| 89 |
def chat_double(history1, history2, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
| 90 |
gen1 = chat(openai.api_model1, history1, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty, openai.api_key1, openai.api_base1)
|
| 91 |
gen2 = chat(openai.api_model2, history2, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty, openai.api_key2, openai.api_base2)
|
| 92 |
+
for (chatbot1_out, chat_history_state1_out, message1), (chatbot2_out, chat_history_state2_out, message2) in zip(gen1, gen2):
|
| 93 |
+
yield chatbot1_out, chatbot2_out, chat_history_state1_out, chat_history_state2_out, ""
|
| 94 |
|
| 95 |
start_message = ""
|
| 96 |
|