AS AgentScopeAPI 手册 / API Reference

OllamaMessageConverter

public class OllamaMessageConverter
源码Source io/agentscope/extensions/model/ollama/formatter/OllamaMessageConverter.java:43–238

Ollama 消息转换器,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.ollama.formatter 包。核心成员包括 convertMessage。

Converter for transforming AgentScope Msg objects to OllamaMessage objects.

方法摘要Method Summary

方法Method说明Description
public OllamaMessage convertMessage(Msg msg)
转换AgentScope 消息对象到 OllamaMessage 对象。
Converts an AgentScope Msg object to an OllamaMessage object.

方法详情Method Detail

convertMessage

public OllamaMessage convertMessage(Msg msg)

转换AgentScope 消息对象到 OllamaMessage 对象。

Converts an AgentScope Msg object to an OllamaMessage object.

参数Parameters
名称Name类型Type说明Description
msgMsgAgentScope 消息到转换。The AgentScope message to convert.
返回Returns OllamaMessage
已转换 OllamaMessage 对象。The converted OllamaMessage object.
源码Source io/agentscope/extensions/model/ollama/formatter/OllamaMessageConverter.java:54–163
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.