AI: backend Ollama + wybór modelu w komendzie przełączania #25

Merged
gitea merged 3 commits from ai-ollama-provider into main 2026-08-24 15:41:28 +00:00
Showing only changes of commit 3279bb923d - Show all commits
+11 -1
View File
@@ -284,7 +284,17 @@ class Events(commands.Cog):
others = await ai_functions.list_provider_models(nazwa_konfigu)
except ai_functions.AIError:
others = []
if len(others) > 1:
current = cfg.get("latest_model")
if others and current not in others:
# The configured/pinned model is not on the server: every
# reply would fail with "model not found" and nothing would
# say why. Flag it here, where the list is already in hand.
message += (
f"\n⚠ Uwaga: '{current}' nie jest wgrany na serwerze. "
f"Dostępne: {', '.join(others)} "
f"(`$gadaj_teraz {nazwa_konfigu} <model>`)."
)
elif len(others) > 1:
message += (
f"\nDostępne modele: {', '.join(others)} "
f"(`$gadaj_teraz {nazwa_konfigu} <model>`)."