Add WebP image support for multimodality
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested. => I searched for "webp".
Expected Behavior
WebP images can be used in multimodality
Current Behavior
Currently no constant is available for WebP in https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/util/MimeTypeUtils.html which is used by Spring AI Media class.
Context
How has this issue affected you?
Currently my company has a PDF to WebP converter pipeline and we'd like to then send these webp images to a LLM supporting multimodality.
Thanks for reporting this.
I checked the current OpenAiChatOptions implementation and it looks like promptCacheKey is indeed missing, while the reference documentation still lists spring.ai.openai.chat.options.prompt-cache-key.
I’d be happy to work on a small PR to restore this option if the team agrees with that direction.
The change would likely include:
- adding
promptCacheKeytoOpenAiChatOptions - adding builder/getter/mutate/equality coverage
- mapping it to the OpenAI chat completion request
- adding focused tests for the builder/property binding/request mapping