Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ mistral_client = Mistral(api_key=os.getenv("MISTRAL_API_KEY"))
|
|
| 12 |
# Choisis à l’exécution quel LLM utiliser
|
| 13 |
DEFAULT_PROVIDER = "openai" # ou "mistral"
|
| 14 |
|
| 15 |
-
def llm_chat(messages,
|
| 16 |
if provider == "openai":
|
| 17 |
# Chat Completions (ex: gpt-4o-mini / gpt-4.1 / … selon ton compte)
|
| 18 |
stream = openai_client.chat.completions.create(
|
|
|
|
| 12 |
# Choisis à l’exécution quel LLM utiliser
|
| 13 |
DEFAULT_PROVIDER = "openai" # ou "mistral"
|
| 14 |
|
| 15 |
+
def llm_chat(messages, max_tokens, temperature, top_p, provider=DEFAULT_PROVIDER):
|
| 16 |
if provider == "openai":
|
| 17 |
# Chat Completions (ex: gpt-4o-mini / gpt-4.1 / … selon ton compte)
|
| 18 |
stream = openai_client.chat.completions.create(
|