AS AgentScopeAPI 手册 / API Reference
类class agentscope.embedding

Parameters

class Parameters(BaseModel)
源码Source agentscope/embedding/_embedding_base.py:54–70

参数,与模型服务通信并返回生成或向量化结果。位于 agentscope.embedding 包。

Intentionally empty in the base — dimensions is a contract property of an embedding model (its output vector size), not a tunable knob, so it lives directly on the instance via the required :paramref:__init__.dimensions argument. Subclasses extend this class to expose non-dimensional knobs (e.g. Gemini's task_type, Dashscope's text_type).

extra="allow" is set so old persisted configs (where dimensions lived in parameters) keep deserialising without raising; :meth:EmbeddingModelBase.__init__ extracts it back out for backward compatibility.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
model_config—
模型配置字段。
ConfigDict(extra='allow')

属性详情Attribute Detail

model_config

 = ConfigDict(extra='allow')

模型配置字段。

The model config field.

源码Source agentscope/embedding/_embedding_base.py:70
基于官方固定版本源码静态生成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.