类的使用
io.agentscope.core.formatter.openai.dto.OpenAIRequest
使用OpenAIRequest的程序包
程序包
说明
-
io.agentscope.core.formatter.openai中OpenAIRequest的使用
修饰符和类型方法说明OpenAIBaseFormatter.buildRequest(String model, List<OpenAIMessage> messages, boolean stream) Build a basic OpenAIRequest.OpenAIBaseFormatter.buildRequest(String model, List<OpenAIMessage> messages, boolean stream, GenerateOptions options, GenerateOptions defaultOptions, List<ToolSchema> tools, ToolChoice toolChoice) Build a complete OpenAIRequest with full configuration.修饰符和类型方法说明protected voidOpenAIChatFormatter.applyAdditionalBodyParams(OpenAIRequest request, GenerateOptions opts) Apply additional body parameters from GenerateOptions to OpenAI request.protected voidOpenAIChatFormatter.applyMaxTokens(OpenAIRequest request, GenerateOptions options, GenerateOptions defaultOptions) abstract voidOpenAIBaseFormatter.applyOptions(OpenAIRequest request, GenerateOptions options, GenerateOptions defaultOptions) Apply generation options to the request.voidOpenAIChatFormatter.applyOptions(OpenAIRequest request, GenerateOptions options, GenerateOptions defaultOptions) voidGLMFormatter.applyToolChoice(OpenAIRequest request, ToolChoice toolChoice) voidGLMMultiAgentFormatter.applyToolChoice(OpenAIRequest request, ToolChoice toolChoice) abstract voidOpenAIBaseFormatter.applyToolChoice(OpenAIRequest request, ToolChoice toolChoice) Apply tool choice configuration to the request.voidOpenAIBaseFormatter.applyToolChoice(OpenAIRequest request, ToolChoice toolChoice, String baseUrl, String modelName) Apply tool choice with provider context.voidOpenAIChatFormatter.applyToolChoice(OpenAIRequest request, ToolChoice toolChoice) abstract voidOpenAIBaseFormatter.applyTools(OpenAIRequest request, List<ToolSchema> tools) Apply tool schemas to the request.voidOpenAIBaseFormatter.applyTools(OpenAIRequest request, List<ToolSchema> tools, String baseUrl, String modelName) Apply tool schemas with provider context.voidOpenAIChatFormatter.applyTools(OpenAIRequest request, List<ToolSchema> tools) -
io.agentscope.core.formatter.openai.dto中OpenAIRequest的使用
-
io.agentscope.core.model中OpenAIRequest的使用
参数类型为OpenAIRequest的io.agentscope.core.model中的方法修饰符和类型方法说明OpenAIClient.call(String apiKey, String baseUrl, OpenAIRequest request) Make a synchronous API call.OpenAIClient.call(String apiKey, String baseUrl, OpenAIRequest request, GenerateOptions options) Make a synchronous API call with options.reactor.core.publisher.Flux<OpenAIResponse> OpenAIClient.stream(String apiKey, String baseUrl, OpenAIRequest request, GenerateOptions options) Make a streaming API call with options for headers and query params.类型变量类型为OpenAIRequest的io.agentscope.core.model中的方法参数修饰符和类型方法说明OpenAIChatModel.Builder.formatter(Formatter<OpenAIMessage, OpenAIResponse, OpenAIRequest> formatter) Sets the message formatter to use.