ThinkOptionDeserializer
class ThinkOptionDeserializer extends JsonDeserializer<ThinkOption>
源码Source
io/agentscope/extensions/model/ollama/options/ThinkOption.java:76–95Think 选项反序列化器,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.options 包,继承自 JsonDeserializer<ThinkOption>。核心成员包括 deserialize。
Custom deserializer implementation for ThinkOption.
Detects the JSON token type (boolean or string) and instantiates the corresponding ThinkOption implementation.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ThinkOption deserialize(JsonParser p, DeserializationContext ctxt) throws IOException | 执行 `deserialize` 方法。 Performs the deserialize operation. |
方法详情Method Detail
deserialize
public ThinkOption deserialize(JsonParser p, DeserializationContext ctxt) throws IOException
执行 deserialize 方法。
Performs the deserialize operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
p | JsonParser | p(类型 `JsonParser`)。The p. |
ctxt | DeserializationContext | ctxt(类型 `DeserializationContext`)。The ctxt. |
ThinkOption返回ThinkOption。Returns think option.
IOException可能抛出 `IOException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/extensions/model/ollama/options/ThinkOption.java:78–94