feat: 加入embeddings、rerank#287
Open
SoraKasvgano wants to merge 1 commit into
Open
Conversation
1. Embedding 502 修复 (internal/relay/transformers.go) - 从 embedding 兼容列表中移除了 openai_response 类型。openai_response 的 outbound transformer 会构造错误的 URL 路径,导致上游必定失败。 ──- 你需要将 LM Studio embedding 渠道的类型改为 openai_embedding 或 openai_chat_completion,这样 outbound transformer 才能正确构造 /v1/embeddings 请求路径。 2. /v1/rerank 支持 (internal/relay/rerank.go + internal/server/server.go) - 新增了 Jina/Cohere 格式的 rerank 透传 handler,复用现有的 group/balancer/metrics 基础设施。 - 支持负载均衡、熔断、重试、自定义 header、代理等所有渠道特性。 - 使用方式:创建一个渠道指向 rerank 服务(如 Jina),创建分组映射模型名,然后通过 POST /v1/rerank 调用。 3. 分组/渠道重名错误优化 (internal/db/errors.go + handlers) - 新增 IsDuplicateError 工具函数,检测 SQLite/MySQL/PostgreSQL 的 UNIQUE 约束错误。 - 创建分组或渠道时如果名称重复,现在返回 HTTP 409 + "Resource already exists",而不是原始的数据库错误信息。
Author
|
Author
|
Commit 97d6a04 axonhub/llm 另外这个go mod tidy 好像获取不到 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
才能正确构造 /v1/embeddings 请求路径。