Support TitleGeneration, Reasoning in HuggingChat

Improve model list in HuggingSpace, PollinationsAI
Fix Image Generation in PollinationsAI
Add Image Upload in PollinationsAI
Support Usage, FinishReason,  jsonMode in PollinationsAI
Add Reasoning to Web UI
Fix using provider api_keys in Web UI
This commit is contained in:
hlohaus
2025-01-23 23:16:12 +01:00
parent 78fa745698
commit cad308108c
15 changed files with 303 additions and 181 deletions

View File

@@ -309,7 +309,7 @@ class Backend_Api(Api):
return "Provider not found", 404
return models
def _format_json(self, response_type: str, content) -> str:
def _format_json(self, response_type: str, content = None, **kwargs) -> str:
"""
Formats and returns a JSON response.
@@ -320,4 +320,4 @@ class Backend_Api(Api):
Returns:
str: A JSON formatted string.
"""
return json.dumps(super()._format_json(response_type, content)) + "\n"
return json.dumps(super()._format_json(response_type, content, **kwargs)) + "\n"