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:
hlohaus 2025-03-23 05:27:52 +01:00
parent 97f1964bb6
commit 8eaaf5db95
21 changed files with 356 additions and 128 deletions

View file

@ -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"]},