OpenAIStreamOptions
@JsonInclude(JsonInclude.Include.NON_NULL) public class OpenAIStreamOptions
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:33–62OpenAI 流选项,保存相关配置项。位于 io.agentscope.extensions.model.openai.dto 包。核心成员包括 getIncludeUsage、setIncludeUsage、withUsage、OpenAIStreamOptions。
OpenAI stream options DTO.
This class represents options for streaming responses.
Example:
`{
"include_usage": true
}
`
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OpenAIStreamOptions() | 初始化 `OpenAIStreamOptions` 实例。 Creates a new instance. |
public OpenAIStreamOptions(Boolean includeUsage) | 初始化 `OpenAIStreamOptions` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Boolean getIncludeUsage() | 获取 `getIncludeUsage`。 Returns the include usage. |
public void setIncludeUsage(Boolean includeUsage) | 设置 `setIncludeUsage`。 Sets the include usage. |
public static OpenAIStreamOptions withUsage()static | 创建流选项使用 include_用量已启用。 Create a stream options with include_usage enabled. |
构造器详情Constructor Detail
OpenAIStreamOptions
public OpenAIStreamOptions()
初始化 OpenAIStreamOptions 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:40OpenAIStreamOptions
public OpenAIStreamOptions(Boolean includeUsage)
初始化 OpenAIStreamOptions 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
includeUsage | Boolean | include 用量(类型 `Boolean`)。The include usage. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:42–44方法详情Method Detail
getIncludeUsage
public Boolean getIncludeUsage()
获取 getIncludeUsage。
Returns the include usage.
Boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:46–48setIncludeUsage
public void setIncludeUsage(Boolean includeUsage)
设置 setIncludeUsage。
Sets the include usage.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
includeUsage | Boolean | include 用量(类型 `Boolean`)。The include usage. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:50–52withUsage
public static OpenAIStreamOptions withUsage()
static
创建流选项使用 include_用量已启用。
Create a stream options with include_usage enabled.
OpenAIStreamOptions返回OpenAIStreamOptions。a new OpenAIStreamOptions with includeUsage=true
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIStreamOptions.java:59–61