Replies: 4 comments 1 reply
|
Hi! I've submitted a PR to implement this feature: #1191 The implementation includes:
Please review when you have time. Thanks! |
0 replies
|
i need this |
0 replies
|
we need this |
0 replies
|
Any updates here? embedding models calling is quite important for a lot of people. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🚀 Feature Request
Summary
Request to add support for the OpenAI-compatible Text Embedding API endpoint (
/v1/embeddings).Motivation
Text embeddings are essential for many AI applications including:
Currently, CLIProxyAPI only proxies chat/completion endpoints, which limits its use in applications requiring both LLM inference and embedding capabilities.
Current State
After reviewing the documentation and source code:
Documentation:
Code (
internal/api/server.go):Currently registered endpoints:
/v1/chat/completions✅/v1/completions✅/v1/messages✅/v1beta/models✅/v1/embeddings❌ MissingProposed Solution
Add a new endpoint
/v1/embeddingsthat proxies to upstream embedding models such as:text-embedding-3-smalltext-embedding-3-largetext-embedding-ada-002Expected API Format
Request:
{ "model": "text-embedding-3-small", "input": "Your text string goes here" }Response:
{ "object": "list", "data": [ { "object": "embedding", "embedding": [0.0023064255, -0.009327292, ...], "index": 0 } ], "model": "text-embedding-3-small", "usage": { "prompt_tokens": 5, "total_tokens": 5 } }Additional Context
This would make CLIProxyAPI a more complete solution for AI application development, allowing users to consolidate both LLM and embedding API calls through a single proxy.
All reactions