Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,8 +42,8 @@ if production:
|
|
| 42 |
|
| 43 |
# Load environment variables
|
| 44 |
load_dotenv()
|
| 45 |
-
api_key='Yb2kAF0DR4Mva5AEmoYFV3kYRAKdXB7i'
|
| 46 |
-
client = MistralClient(api_key=api_key)
|
| 47 |
model = 'mistral-small'
|
| 48 |
|
| 49 |
title = "Gaia Mistral Chat Demo"
|
|
@@ -79,10 +79,10 @@ def create_prompt_system():
|
|
| 79 |
|
| 80 |
|
| 81 |
def chat_with_mistral(user_input):
|
| 82 |
-
messages = [ChatMessage(role="user", content=user_input)]
|
| 83 |
|
| 84 |
-
chat_response = client.chat(model=model, messages=messages)
|
| 85 |
-
return chat_response.choices[0].message.content
|
| 86 |
|
| 87 |
|
| 88 |
# create a FastAPI app
|
|
|
|
| 42 |
|
| 43 |
# Load environment variables
|
| 44 |
load_dotenv()
|
| 45 |
+
#api_key='Yb2kAF0DR4Mva5AEmoYFV3kYRAKdXB7i'
|
| 46 |
+
#client = MistralClient(api_key=api_key)
|
| 47 |
model = 'mistral-small'
|
| 48 |
|
| 49 |
title = "Gaia Mistral Chat Demo"
|
|
|
|
| 79 |
|
| 80 |
|
| 81 |
def chat_with_mistral(user_input):
|
| 82 |
+
#messages = [ChatMessage(role="user", content=user_input)]
|
| 83 |
|
| 84 |
+
#chat_response = client.chat(model=model, messages=messages)
|
| 85 |
+
return 'Donne moi une clé API valide et je te réponds volontiers ;-)' #chat_response.choices[0].message.content
|
| 86 |
|
| 87 |
|
| 88 |
# create a FastAPI app
|