mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Add HuggingFaceMedia provider with Video Generation
Add Support for Video Response in UI Improve Support for Audio Response in UI Fix ModelNotSupported errors in HuggingSpace providers
This commit is contained in:
parent
97f1964bb6
commit
8eaaf5db95
21 changed files with 356 additions and 128 deletions
|
|
@ -203,7 +203,21 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
|
|||
Returns:
|
||||
A list of messages with the user input and the image, if any
|
||||
"""
|
||||
# Create a message object with the user role and the content
|
||||
# merged_messages = []
|
||||
# last_message = None
|
||||
# for message in messages:
|
||||
# current_message = last_message
|
||||
# if current_message is not None:
|
||||
# if current_message["role"] == message["role"]:
|
||||
# current_message["content"] += "\n" + message["content"]
|
||||
# else:
|
||||
# merged_messages.append(current_message)
|
||||
# last_message = message.copy()
|
||||
# else:
|
||||
# last_message = message.copy()
|
||||
# if last_message is not None:
|
||||
# merged_messages.append(last_message)
|
||||
|
||||
messages = [{
|
||||
"id": str(uuid.uuid4()),
|
||||
"author": {"role": message["role"]},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue