I'm exploring the library (version 1.0.0-SNAPSHOT) and have found it to be a powerful tool for integrating AI capabilities into Spring applications. However, I’ve encountered a discrepancy between the official documentation and the API reference that I'd like to clarify.
In the official documentation , there is an example demonstrating how to configure and use the OpenAiChatModel class:
var openAiApi = new OpenAiApi(System.getenv("OPENAI_API_KEY"));
var openAiChatOptions = OpenAiChatOptions.builder()
.model("gpt-3.5-turbo")
.temperature(0.4)
.maxTokens(200)
.build();
var chatModel = new OpenAiChatModel(this.openAiApi, this.openAiChatOptions);
This example suggests that the OpenAiChatModel constructor only requires two parameters, an OpenAiApi instance and an OpenAiChatOptions object. However, when I checked the API documentation API documentation, I noticed that the OpenAiChatModel class has only one constructor, which requires five parameters:
OpenAiChatModel(OpenAiApi openAiApi,
OpenAiChatOptions defaultOptions,
ToolCallingManager toolCallingManager,
.springframework.retry.support.RetryTemplate retryTemplate,
io.micrometer.observation.ObservationRegistry observationRegistry)
Could you please tell me why there is this difference between the example code in the documentation and the actual API implementation?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744296860a4567302.html
评论列表(0条)