Skip to content

参考 OpenAI API 格式以及开源框架 xusenlinzy/api-for-open-llm 的文本 embedding 模型服务接口

License

Notifications You must be signed in to change notification settings

czas09/embedding-model-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

embedding-model-server

参考 OpenAI API 格式以及开源框架 xusenlinzy/api-for-open-llm 的文本 embedding 模型服务接口

调用方法:

curl http://localhost:10270/v1/embeddings \
  -H "Authorization: Bearer xxx" \
  -H "Content-Type: application/json" \
  -d '{"input": "你好", "model": "m3e-base-20230608"}'

响应体结构:

{
  "object": "list", 
  "data": [
    {
      "object": "embedding", 
      "embedding": [
        0.028495032340288162, 
        0.02246084064245224, 
        ... (768 floats total for m3e-base)
        -0.012482207268476486, 
      ], 
      "index": 0
    }
  ], 
  "model": "m3e-base-20230608", 
  "usage": {
    "prompt_tokens": 4, 
    "total_tokens": 4
  }
}

About

参考 OpenAI API 格式以及开源框架 xusenlinzy/api-for-open-llm 的文本 embedding 模型服务接口

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages