Ernie Embedding v1 คือโมเดล embedding ที่เน้นภาษาจีนจาก Baidu สร้างเวกเตอร์ 384 มิติ ปรับแต่งสำหรับข้อความภาษาจีนตัวย่อ เป็นตัวเลือกเริ่มต้นที่คุ้มค่าสำหรับการค้นหาเชิงความหมายภาษาจีนและกรณีการใช้งานแนะนำที่คำค้นหาสั้นเป็นหลัก
เปลี่ยนแทน OpenAI ได้ทันที แค่เปลี่ยน base_url และ model เท่านั้น
# 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.