OpenAIResponsesChatModel
public class OpenAIResponsesChatModel extends ChatModelBase
io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:51–388OpenAIResponse s 聊天模型,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.openaiofficial 包,继承自 ChatModelBase。核心成员包括 getModelName、doStream、builder。
A class in io.agentscope.extensions.model.openaiofficial that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.openaiofficial. Extends ChatModelBase.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.model.openaiofficial that talks to model services and returns generated or embedded output. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getModelName() | 获取模型名称。 Returns the model name. |
protected Flux<ChatResponse> doStream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options) | 以流式方式执行并返回结果。 Performs the do stream operation. |
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
方法详情Method Detail
getModelName
public String getModelName()
获取模型名称。
Returns the model name.
Stringio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:85–88doStream
protected Flux<ChatResponse> doStream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options)
以流式方式执行并返回结果。
Performs the do stream operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
tools | List<ToolSchema> | 工具列表(类型 `List`)。The tools. |
options | GenerateOptions | 选项(类型 `GenerateOptions`)。The options. |
Flux<ChatResponse>io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:90–99builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:249–251嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.openaiofficial 包。核心成员包括 apiKey、baseUrl、modelName、stream、generateOptions、contextWindowSize。
A class in io.agentscope.extensions.model.openaiofficial that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.openaiofficial.