OpenAIConfig
interface OpenAIConfig
源码Source
io/agentscope/quarkus/runtime/AgentScopeConfig.java:118–140定义 OpenAI 配置契约的接口。位于 io.agentscope.quarkus.runtime 包。核心成员包括 apiKey、modelName、stream、baseUrl。
OpenAI configuration.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Optional<String> apiKey() | 用于OpenAI的API 密钥。 API key for OpenAI. |
public String modelName() | 返回模型名称。 Model name (e.g., gpt-4, gpt-4-turbo). |
public boolean stream() | 返回流。 Enable streaming. |
public Optional<String> baseUrl() | 返回基类 URL。 Base URL (optional). |
方法详情Method Detail
apiKey
public Optional<String> apiKey()
用于OpenAI的API 密钥。
API key for OpenAI.
Optional<String>返回可选。Returns optional.
源码Source
io/agentscope/quarkus/runtime/AgentScopeConfig.java:122modelName
public String modelName()
返回模型名称。
Model name (e.g., gpt-4, gpt-4-turbo).
String返回字符串结果。Returns a string.
源码Source
io/agentscope/quarkus/runtime/AgentScopeConfig.java:127–128stream
public boolean stream()
返回流。
Enable streaming.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/quarkus/runtime/AgentScopeConfig.java:133–134baseUrl
public Optional<String> baseUrl()
返回基类 URL。
Base URL (optional).
Optional<String>返回可选。Returns optional.
源码Source
io/agentscope/quarkus/runtime/AgentScopeConfig.java:139