类class
agentscope.embeddingParameters
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