Builder
public static class Builder
io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:253–387构建器,用于构建并配置目标实例。位于 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.
方法摘要Method Summary
方法详情Method Detail
apiKey
public Builder apiKey(String apiKey)
设置API 键。
Performs the api key operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiKey | String | API 键(类型 `String`)。The api key. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:266–269baseUrl
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。The base url. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:271–274modelName
public Builder modelName(String modelName)
设置模型名称。
Performs the model name operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
modelName | String | 模型名称(类型 `String`)。The model name. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:276–279stream
public Builder stream(boolean stream)
设置流。
Performs the stream operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stream | boolean | 流(类型 `boolean`)。The stream. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:281–284generateOptions
public Builder generateOptions(GenerateOptions generateOptions)
设置该配置项。
Performs the generate options operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
generateOptions | GenerateOptions | generate 选项(类型 `GenerateOptions`)。The generate options. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:286–289contextWindowSize
public Builder contextWindowSize(int contextWindowSize)
设置该配置项。
Performs the context window size operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
contextWindowSize | int | 上下文 Window 大小(类型 `int`)。The context window size. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:291–294strictTools
public Builder strictTools(Boolean strictTools)
设置该配置项。
Performs the strict tools operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
strictTools | Boolean | strict 工具(类型 `Boolean`)。The strict tools. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:296–299strictJsonSchema
public Builder strictJsonSchema(Boolean strictJsonSchema)
设置该配置项。
Performs the strict json schema operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
strictJsonSchema | Boolean | strict JSON 模式(类型 `Boolean`)。The strict json schema. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:301–304formatter
public Builder formatter(ResponsesMultiAgentFormatter formatter)
设置格式化器。
Performs the formatter operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
formatter | ResponsesMultiAgentFormatter | 格式化器(类型 `ResponsesMultiAgentFormatter`)。The formatter. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:306–309additionalHeaders
public Builder additionalHeaders(Map<String, String> headers)
设置该参数。
Performs the additional headers operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
headers | Map<String, String> | 请求头(类型 `Map`)。The headers. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:311–314proxy
public Builder proxy(ProxyConfig proxyConfig)
设置代理。
Performs the proxy operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
proxyConfig | ProxyConfig | 代理配置(类型 `ProxyConfig`)。The proxy config. |
Builderio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:316–319build
public OpenAIResponsesChatModel build()
构建并返回最终实例。
Creates and returns an instance.
OpenAIResponsesChatModelio/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:321–386