text-embedding-ada-002。
核心能力
- 文本向量 - 将文本转换为数值向量
- 批量输入 - 支持字符串或字符串数组
- 相似度任务 - 可用于检索与聚类
快速示例
- cURL
- Python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Text Embedding Ada 002:文本向量模型。包含 MixRoute 调用示例与参数。
text-embedding-ada-002。
curl "https://api.mixroute.ai/v1/embeddings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-ada-002",
"input": "MixRoute model API"
}'
import requests
response = requests.post(
"https://api.mixroute.ai/v1/embeddings",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'text-embedding-ada-002', 'input': 'MixRoute model API'},
)
print(response.json())
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 text-embedding-ada-002。 |
input | string | array | 是 | 需要向量化的文本或文本数组。 |
dimensions | integer | 否 | 模型支持时指定输出维度。 |
encoding_format | string | 否 | 向量编码格式。 |