ContextModelFactory
@FunctionalInterface public interface ContextModelFactory
源码Source
io/agentscope/core/model/ModelRegistry.java:221–224定义上下文模型工厂契约的接口。位于 io.agentscope.core.model 包。核心成员包括 create。
An interface in io.agentscope.core.model that defines the contract for components that talks to model services and returns generated or embedded output. Declared in io.agentscope.core.model.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Model create(String modelId, ModelCreationContext context) | 创建并返回实例。 Creates and returns an instance. |
方法详情Method Detail
create
public Model create(String modelId, ModelCreationContext context)
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
modelId | String | 模型标识(类型 `String`)。The model id. |
context | ModelCreationContext | 上下文(类型 `ModelCreationContext`)。The context. |
Model返回模型。Returns model.
源码Source
io/agentscope/core/model/ModelRegistry.java:223