feat: add audio input support for Gemini translation (#913)
Add input_audio and audio_url content type handlers to convertOpenAIContentToParts() in geminiHelper.js, converting OpenAI audio format to Gemini inlineData format. Also add audio types to VALID_OPENAI_CONTENT_TYPES in openaiHelper.js so they are not stripped by filterToOpenAIFormat(). Fixes #912
This commit is contained in:
1 parent
25182ff772
commit
7f93df3a92
2 files changed
+18
-1
No files matched your search
@@ -1,7 +1,7 @@
|
||||
// OpenAI helper functions for translator
|
||||
|
||||
// Valid OpenAI content block types
|
||||
export const VALID_OPENAI_CONTENT_TYPES = ["text", "image_url", "image"];
|
||||
export const VALID_OPENAI_CONTENT_TYPES = ["text", "image_url", "image", "input_audio", "audio_url"];
|
||||
export const VALID_OPENAI_MESSAGE_TYPES = ["text", "image_url", "image", "tool_calls", "tool_result"];
|
||||
|
||||
// Filter messages to OpenAI standard format
|
||||
|
||||
Reference in new issue
Block a user