Skip to content

Allow content arrays for multimodal OpenAI requests#5277

Merged
oobabooga merged 2 commits intooobabooga:devfrom
Cohee1207:openai-multimodal
Jan 22, 2024
Merged

Allow content arrays for multimodal OpenAI requests#5277
oobabooga merged 2 commits intooobabooga:devfrom
Cohee1207:openai-multimodal

Conversation

@Cohee1207
Copy link
Copy Markdown
Contributor

This patch will allow sending prompts to chat completions endpoint formatted according to OpenAI vision guide. If message content contains a list with text and image parts, it will be converted to the format expected by the multimodal extension (two user messages).

Without this change, the following exception will be thrown if the message contents include a list:

image

Checklist:

@oobabooga
Copy link
Copy Markdown
Owner

Thanks for the fix @Cohee1207, I wasn't aware of this.

@oobabooga oobabooga merged commit fbf8ae3 into oobabooga:dev Jan 22, 2024
PoetOnTheRun pushed a commit to PoetOnTheRun/text-generation-webui that referenced this pull request Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants