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

EmbeddingUsage

@dataclass
class EmbeddingUsage(DictMixin)
源码Source agentscope/embedding/_embedding_usage.py:10–20

向量化用量,与模型服务通信并返回生成或向量化结果。位于 agentscope.embedding 包,继承自 DictMixin。

The usage of an embedding model API invocation. Declared in agentscope.embedding. Extends DictMixin.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
timefloat
时间字段。
—
tokensint | None
令牌数字段。
field(default_factory=lambda: None)
typeLiteral['embedding']
类型字段。
field(default_factory=lambda: 'embedding')

属性详情Attribute Detail

time

float

时间字段。声明为 float。

The time field.

源码Source agentscope/embedding/_embedding_usage.py:13

tokens

int | None = field(default_factory=lambda: None)

令牌数字段。声明为 int | None。

The tokens field.

源码Source agentscope/embedding/_embedding_usage.py:16

type

Literal['embedding'] = field(default_factory=lambda: 'embedding')

类型字段。声明为 Literal['embedding']。

The type field.

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