Update mistral name
Browse files
app.py
CHANGED
@@ -45,7 +45,11 @@ def predict(message, history, threshold, temperature):
|
|
45 |
for i, chunk in enumerate(stream):
|
46 |
print(chunk)
|
47 |
if i == 0:
|
48 |
-
|
|
|
|
|
|
|
|
|
49 |
yield model_prefix
|
50 |
partial_message += model_prefix
|
51 |
partial_message += chunk.choices[0].delta.content or ""
|
@@ -62,6 +66,7 @@ demo = gr.ChatInterface(
|
|
62 |
),
|
63 |
],
|
64 |
title="RouteLLM",
|
|
|
65 |
description="This is a demo of our matrix factorization router, calibrated so that approximately 50% of calls (those that are harder) are routed to GPT-4, with remaining calls routed to Mixtral 8x7B.\n\nCheck out https://github.com/lm-sys/RouteLLM for details!",
|
66 |
)
|
67 |
|
|
|
45 |
for i, chunk in enumerate(stream):
|
46 |
print(chunk)
|
47 |
if i == 0:
|
48 |
+
if chunk.model == "mistralai/Mixtral-8x7B-Instruct-v0.1":
|
49 |
+
model_name = "Mixtral-8x7B-Instruct-v0.1"
|
50 |
+
else:
|
51 |
+
model_name = chunk.model
|
52 |
+
model_prefix = f"**[{model_name}]**\n"
|
53 |
yield model_prefix
|
54 |
partial_message += model_prefix
|
55 |
partial_message += chunk.choices[0].delta.content or ""
|
|
|
66 |
),
|
67 |
],
|
68 |
title="RouteLLM",
|
69 |
+
fill_height=True,
|
70 |
description="This is a demo of our matrix factorization router, calibrated so that approximately 50% of calls (those that are harder) are routed to GPT-4, with remaining calls routed to Mixtral 8x7B.\n\nCheck out https://github.com/lm-sys/RouteLLM for details!",
|
71 |
)
|
72 |
|