spring-projects / spring-ai

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

Why are AnthropicChatOptions's getModel(), getFrequencyPenalty(), and getPresencePenalty() methods not implemented? #1546

Open cowboysj opened 1 month ago

cowboysj commented 1 month ago

In the AnthropicChatOptions class, I noticed that the getModel(), getFrequencyPenalty(), and getPresencePenalty() methods are returning null. Can you clarify why these methods are not fully implemented? Are these options not relevant to the Bedrock implementation, or are there plans to implement them in the future? Are these features not supported by Bedrock at the moment, or are there plans to implement them internally in the near future?

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java

tzolov commented 1 month ago

@cowboysj this is the old bedrock api. We are working on replacing it with the new Bedrock Converse API. But this would be limited to the fields that the Bedrock Converse and the Anthropic API. provide.

The Spring AI direct Anthropic integration, supports everything: https://docs.spring.io/spring-ai/reference/api/chat/anthropic-chat.html and allows you to access any native anthropic options: https://docs.spring.io/spring-ai/reference/api/chat/anthropic-chat.html#_chat_properties