Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +7 -7
chain_app.py
CHANGED
@@ -2529,14 +2529,14 @@ async def main(message: cl.Message):
|
|
2529 |
"mistralai/Mistral-7B-Instruct-v0.2",
|
2530 |
token=f"{hf_token_llama_3_1}",
|
2531 |
)
|
2532 |
-
|
2533 |
-
|
2534 |
-
messages=[{"role": "user", "content": message.content}],
|
2535 |
max_tokens=500,
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
|
|
2540 |
|
2541 |
|
2542 |
|
|
|
2529 |
"mistralai/Mistral-7B-Instruct-v0.2",
|
2530 |
token=f"{hf_token_llama_3_1}",
|
2531 |
)
|
2532 |
+
result = client.chat_completion(
|
2533 |
+
messages=[{"role": "user", "content": "What is the capital of France?"}],
|
|
|
2534 |
max_tokens=500,
|
2535 |
+
)
|
2536 |
+
|
2537 |
+
await cl.Message(
|
2538 |
+
content=result.choices[0].message.content,
|
2539 |
+
).send()
|
2540 |
|
2541 |
|
2542 |
|