Spaces:
Running
Running
Commit ·
94e5bdb
1
Parent(s): da92457
updated llm
Browse files- core_logic.py +1 -1
core_logic.py
CHANGED
|
@@ -69,7 +69,7 @@ def chat_function(message, history):
|
|
| 69 |
try:
|
| 70 |
#for chunk in client.chat_completion(messages, max_tokens=2048, stream=True, temperature=0.2):
|
| 71 |
# --- Uncomment below for GROQ
|
| 72 |
-
for chunk in client.chat.completions.create(model="llama-3.1-
|
| 73 |
# FIX: Check if choices exists and is not empty
|
| 74 |
if hasattr(chunk, 'choices') and len(chunk.choices) > 0:
|
| 75 |
token = chunk.choices[0].delta.content
|
|
|
|
| 69 |
try:
|
| 70 |
#for chunk in client.chat_completion(messages, max_tokens=2048, stream=True, temperature=0.2):
|
| 71 |
# --- Uncomment below for GROQ
|
| 72 |
+
for chunk in client.chat.completions.create(model="llama-3.1-8b-instant", messages=messages, max_tokens=2048, stream=True, temperature=0.2): # Or model="llama-3.1-70b-versatile"
|
| 73 |
# FIX: Check if choices exists and is not empty
|
| 74 |
if hasattr(chunk, 'choices') and len(chunk.choices) > 0:
|
| 75 |
token = chunk.choices[0].delta.content
|