类 ChatModelBase
java.lang.Object
io.agentscope.core.model.ChatModelBase
- 所有已实现的接口:
Model
Abstract base class for all models in the AgentScope framework.
This class provides common functionality for model including basic model invocation and tracing.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected abstract reactor.core.publisher.Flux<ChatResponse> doStream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options) Internal implementation for streaming chat completion responses.final reactor.core.publisher.Flux<ChatResponse> stream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options) Stream chat completion responses.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 io.agentscope.core.model.Model
getModelName
-
构造器详细资料
-
ChatModelBase
public ChatModelBase()
-
-
方法详细资料
-
stream
public final reactor.core.publisher.Flux<ChatResponse> stream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options) Stream chat completion responses. The model internally handles message formatting using its configured formatter.Tracing data will be captured once telemetry is enabled.
-
doStream
protected abstract reactor.core.publisher.Flux<ChatResponse> doStream(List<Msg> messages, List<ToolSchema> tools, GenerateOptions options) Internal implementation for streaming chat completion responses. Subclasses must implement their specific logic here.- 参数:
messages- AgentScope messages to send to the modeltools- Optional list of tool schemas (null or empty if no tools)options- Optional generation options (null to use defaults)- 返回:
- Flux stream of chat responses
-