mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
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:
parent
78fa745698
commit
cad308108c
15 changed files with 303 additions and 181 deletions
|
|
@ -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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue