Zhipu GLM

GLM Embedding 3 API

CN Zhipu GLM | リリース 2024-06
埋め込みドキュメント → APIキーを取得

GLM Embedding 3はZhipu AIの埋め込みモデルであり、中国語と英語のバイリンガル検索に最適化された2048次元のベクトルを生成します。中国語のRAGパイプラインで広く利用され、C-MTEBにおいて最先端の英語埋め込みモデルと同等の性能を、はるかに低いコストで実現します。

埋め込み

料金 (公式、1Mトークンあたり)

入力
$0.05/M
出力
$0.00/M

仕様

コンテキストウィンドウ8.192K トークン 入力モダリティテキスト ストリーミングはい APIOpenAI互換

GLM Embedding 3の使い方

OpenAIの直接代替。base_urlとモデルのみ変更。

# Python - pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://meshtok.com/v1",
    api_key="sk-your-MeshTok-key",
)

resp = client.chat.completions.create(
    model="bigmodel/embedding-3",
    messages=[{"role":"user","content":"Hello!"}],
)
print(resp.choices[0].message.content)
# cURL
curl https://meshtok.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-MeshTok-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"bigmodel/embedding-3","messages":[{"role":"user","content":"Hello!"}]}'

関連モデル

検討できる他のモデル。