spring-projects / spring-ai

An Application Framework for AI Engineering
https://docs.spring.io/spring-ai/reference/index.html
Apache License 2.0
3.32k stars 850 forks source link

Improve ChatGenerationMetadata ability to handle arbitrary data returned from the generation. #1722

Open markpollack opened 1 week ago

markpollack commented 1 week ago

There are several objects that should be returned as metadata, but the current implementation was developed a long time ago and only handled the metadata that was returned from making Azure OpenAI calls. A hashmap at least should be added, but also a comparison of various model APIs should be done to look for common properties that are returned.