Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiproxy 360代理支持embedding模型 #1247

Merged
merged 7 commits into from
Aug 26, 2024
Merged

aiproxy 360代理支持embedding模型 #1247

merged 7 commits into from
Aug 26, 2024

Conversation

hackerYHT
Copy link
Contributor

Ⅰ. Describe what this PR did

aiproxy 360代理支持embedding模型

Ⅱ. Does this pull request fix one issue?

fixes #951

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

openai协议,请求embedding模型

curl --location 'http://127.0.0.1:10000/v1/embeddings' \
--header 'Content-Type:  application/json' \
--data '{
  "input":["你好"],
  "model":"text-embedding-3-small"
}'

回复

{
  "data": [
    {
      "embedding": [
        -0.011237,
        -0.015433,
        ...,
        -0.042201
      ],
      "index": 0,
      "object": ""
    }
  ],
  "model": "embedding_s1_v1.2",
  "object": "",
  "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
  }
}

Ⅴ. Special notes for reviews

# Conflicts:
#	plugins/wasm-go/extensions/ai-proxy/README.md
#	plugins/wasm-go/extensions/ai-proxy/provider/ai360.go
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.30%. Comparing base (ef31e09) to head (ccacc27).
Report is 61 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1247      +/-   ##
==========================================
+ Coverage   35.91%   44.30%   +8.39%     
==========================================
  Files          69       75       +6     
  Lines       11576     9821    -1755     
==========================================
+ Hits         4157     4351     +194     
+ Misses       7104     5143    -1961     
- Partials      315      327      +12     

see 80 files with indirect coverage changes

Copy link
Collaborator

@CH3CHO CH3CHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CH3CHO CH3CHO merged commit 40a74e3 into alibaba:main Aug 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AI 代理 Wasm 插件对接 360 智脑
3 participants