Read FinishReason and Usage from Gemini API

Add "Custom Provider": Set  API Url in the settings
Remove Discord link from result, add them to  attr: Jmuz
Fix Bug: File content are added to the prompt
Changed response from /v1/models API
Disable Pizzagpt Provider
This commit is contained in:
Heiner Lohaus
2025-01-14 17:07:39 +01:00
parent 2b5f6a4259
commit 2df2d6b0cf
11 changed files with 81 additions and 57 deletions

View File

@@ -303,7 +303,8 @@ class Backend_Api(Api):
def get_provider_models(self, provider: str):
api_key = request.headers.get("x_api_key")
models = super().get_provider_models(provider, api_key)
api_base = request.headers.get("x_api_base")
models = super().get_provider_models(provider, api_key, api_base)
if models is None:
return "Provider not found", 404
return models