OpenAIEmbedder 基于 OpenAI 兼容接口的 Embedder 实现。 默认调用 POST {BaseURL}/v1/embeddings, 请求格式: { "input": [...], "model": "text-embedding-3-small" }
| 15 | // |
| 16 | // { "input": [...], "model": "text-embedding-3-small" } |
| 17 | type OpenAIEmbedder struct { |
| 18 | BaseURL string |
| 19 | APIKey string |
| 20 | Model string |
| 21 | Client *http.Client |
| 22 | } |
| 23 | |
| 24 | // NewOpenAIEmbedder 创建 OpenAIEmbedder。 |
| 25 | // baseURL 示例: |
nothing calls this directly
no outgoing calls
no test coverage detected