Update main.py
Browse files
main.py
CHANGED
|
@@ -125,12 +125,12 @@ def together_response(message, model = llm_default_small, SysPrompt = SysPromptD
|
|
| 125 |
return response.choices[0].message.content
|
| 126 |
|
| 127 |
except Exception as e:
|
|
|
|
| 128 |
params["model"] = llm_fallback_small if model == llm_default_small else llm_fallback_medium
|
| 129 |
response = together_client.chat.completions.create(**params)
|
| 130 |
return response.choices[0].message.content
|
| 131 |
|
| 132 |
|
| 133 |
-
|
| 134 |
def json_from_text(text):
|
| 135 |
"""
|
| 136 |
Extracts JSON from text using regex and fuzzy JSON loading.
|
|
|
|
| 125 |
return response.choices[0].message.content
|
| 126 |
|
| 127 |
except Exception as e:
|
| 128 |
+
print(f"Error calling GROQ API: {e}")
|
| 129 |
params["model"] = llm_fallback_small if model == llm_default_small else llm_fallback_medium
|
| 130 |
response = together_client.chat.completions.create(**params)
|
| 131 |
return response.choices[0].message.content
|
| 132 |
|
| 133 |
|
|
|
|
| 134 |
def json_from_text(text):
|
| 135 |
"""
|
| 136 |
Extracts JSON from text using regex and fuzzy JSON loading.
|