Spaces:
Sleeping
Sleeping
Ganesh Chintalapati
commited on
Commit
·
aa39f2a
1
Parent(s):
76efecf
login
Browse files
core.py
CHANGED
|
@@ -44,14 +44,14 @@ async def query_model(query: str, providers: List[str], history: List[Dict[str,
|
|
| 44 |
gemini_msgs = history.copy()
|
| 45 |
|
| 46 |
if "OpenAI" in providers:
|
| 47 |
-
|
| 48 |
-
openai_msgs.append({"role": "assistant", "content":
|
| 49 |
if "Anthropic" in providers:
|
| 50 |
-
|
| 51 |
-
anthropic_msgs.append({"role": "assistant", "content":
|
| 52 |
if "Gemini" in providers:
|
| 53 |
-
|
| 54 |
-
gemini_msgs.append({"role": "assistant", "content":
|
| 55 |
|
| 56 |
updated_history = history + [{"role": "user", "content": query}]
|
| 57 |
yield "", openai_msgs, anthropic_msgs, gemini_msgs, updated_history
|
|
|
|
| 44 |
gemini_msgs = history.copy()
|
| 45 |
|
| 46 |
if "OpenAI" in providers:
|
| 47 |
+
openai_response = await ask_openai(query, history)
|
| 48 |
+
openai_msgs.append({"role": "assistant", "content": openai_response})
|
| 49 |
if "Anthropic" in providers:
|
| 50 |
+
anthropic_response = await ask_anthropic(query, history)
|
| 51 |
+
anthropic_msgs.append({"role": "assistant", "content": anthropic_response})
|
| 52 |
if "Gemini" in providers:
|
| 53 |
+
gemini_response = await ask_gemini(query, history)
|
| 54 |
+
gemini_msgs.append({"role": "assistant", "content": gemini_response})
|
| 55 |
|
| 56 |
updated_history = history + [{"role": "user", "content": query}]
|
| 57 |
yield "", openai_msgs, anthropic_msgs, gemini_msgs, updated_history
|