Ernie Embedding v1は、百度の中国語優先埋め込みモデルであり、簡体字中国語テキストに最適化された384次元のベクトルを生成します。短いクエリが主流となる中国語のセマンティック検索やレコメンデーションのユースケースにおいて、コスト効率の高いデフォルトモデルです。
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="baidu/embedding-v1", 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":"baidu/embedding-v1","messages":[{"role":"user","content":"Hello!"}]}'
検討できる他のモデル。
Fast and cost-efficient.
Fast and cost-efficient.
Fast and cost-efficient.
Fast and cost-efficient.