spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Streamlined ModelOptions APIs for chat, embedding, and image

Open ThomasVitale opened this issue 1 year ago • 2 comments
trafficstars

While working on the initial observability support in Spring AI (delivered in https://github.com/spring-projects/spring-ai/pull/954), more common behaviour emerged across the different model providers with regards to the options used to customize model requests. It's worth surfacing those common options through the ChatOptions (e.g. model name, max tokens, stop sequences), EmbeddingOptions (e.g. dimensions, encoding format), and ImageOptions (e.g. image style) abstractions.

As agreed with @tzolov, I'll submit a PR for each of the three option variants and simply the observation contextual data accordingly.

  • [ ] ChatOptions
  • [x] EmbeddingOptions => https://github.com/spring-projects/spring-ai/pull/1183
  • [x] ImageOptions => https://github.com/spring-projects/spring-ai/pull/1151

ThomasVitale avatar Aug 02 '24 18:08 ThomasVitale