fixed bugs

This commit is contained in:
belviskhoremk
2026-02-22 23:46:16 +00:00
parent 88ca23adde
commit 6fc607e32c
7 changed files with 195 additions and 10 deletions

View File

@@ -32,11 +32,10 @@ class LLMService:
except Exception as e:
logger.error(f"LLM error ({provider}/{model}): {e}")
# Fallback to a basic model if available
if model != "accounts/fireworks/models/llama-v3p1-70b-instruct" and settings.fireworks_api_key:
logger.info("Falling back to Fireworks AI")
if model != "accounts/fireworks/models/kimi-k2-instruct-0905" and settings.fireworks_api_key:
return await self._call_fireworks(
messages,
"accounts/fireworks/models/llama-v3p1-70b-instruct",
"accounts/fireworks/models/kimi-k2-instruct-0905",
max_tokens,
temperature,
)
@@ -137,7 +136,7 @@ class LLMService:
max_tokens: int,
temperature: float,
) -> Dict[str, Any]:
import google.generativeai as genai
import google.genai as genai
genai.configure(api_key=settings.google_api_key)
gemini_model = genai.GenerativeModel(model)