AS AgentScopeAPI 手册 / API Reference

OpenAIResponsesChatModel

public class OpenAIResponsesChatModel extends ChatModelBase
源码Source io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:51–388

OpenAIResponse 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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:85–88

doStream

protected Flux<ChatResponse> doStream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options)

以流式方式执行并返回结果。

Performs the do stream operation.

参数Parameters
名称Name类型Type说明Description
messagesList<Msg>消息列表(类型 `List`)。The messages.
toolsList<ToolSchema>工具列表(类型 `List`)。The tools.
optionsGenerateOptions选项(类型 `GenerateOptions`)。The options.
返回Returns Flux<ChatResponse>
返回Flux。Returns flux.
源码Source io/agentscope/extensions/model/openaiofficial/OpenAIResponsesChatModel.java:90–99

builder

public static Builder builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/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.

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.