labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.49k stars 4.69k forks source link

4.6.8 及最新release text-embedding-ada-002 unsupported protocol scheme #986

Closed ivanberry closed 7 months ago

ivanberry commented 7 months ago

例行检查

你的版本

问题描述 4.6.8 及最新release text-embedding-ada-002 unsupported protocol scheme。

添加应用后,能正常对话,但是在添加知识库后一直出于索引中,后台一起在请求,log如下:

[Vector Queue] Start
fastgpt  | Embedding Error eY [Error]: 500 Post "text-embedding-ada-002/openai/deployments/Embedding-V1/embeddings?api-version=2023-06-01-preview": unsupported protocol scheme "" (request id: 20240313080851314248204eVolG43r)
fastgpt  |     at eL.generate (/app/projects/app/.next/server/chunks/53204.js:21:70210)
fastgpt  |     at ax.makeStatusError (/app/projects/app/.next/server/chunks/53204.js:21:81454)
fastgpt  |     at ax.makeRequest (/app/projects/app/.next/server/chunks/53204.js:21:82188)
fastgpt  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
fastgpt  |     at async W (/app/projects/app/.next/server/chunks/82729.js:31:1242)
fastgpt  |     at async w (/app/projects/app/.next/server/chunks/82729.js:23:399)
fastgpt  |     at async Promise.all (index 0)
fastgpt  |     at async I (/app/projects/app/.next/server/chunks/5182.js:54:15961)
fastgpt  |     at async y (/app/projects/app/.next/server/chunks/5182.js:57:1946) {
fastgpt  |   status: 500,
fastgpt  |   headers: {
fastgpt  |     connection: 'keep-alive',
fastgpt  |     'content-length': '270',
fastgpt  |     'content-type': 'application/json; charset=utf-8',
fastgpt  |     date: 'Wed, 13 Mar 2024 00:08:49 GMT',
fastgpt  |     server: 'openresty/1.25.3.1',
fastgpt  |     'x-oneapi-request-id': '20240313080851314248204eVolG43r'
fastgpt  |   },
fastgpt  |   error: {
fastgpt  |     message: 'Post "text-embedding-ada-002/openai/deployments/Embedding-V1/embeddings?api-version=2023-06-01-preview": unsupported protocol scheme "" (request id: 20240313080851314248204eVolG43r)',
fastgpt  |     type: 'one_api_error',
fastgpt  |     param: '',
fastgpt  |     code: 'do_request_failed'
fastgpt  |   },
fastgpt  |   code: 'do_request_failed',
fastgpt  |   param: '',
fastgpt  |   type: 'one_api_error'
fastgpt  | }
500 |    5.496735ms |  222.186.150.52 |    POST /v1/embeddings
one-api-server  | [ERR] 2024/03/13 - 08:04:10 | 202403130804109440229053jxbh5sB | relay error (channel #7): Post "text-embedding-ada-002/openai/deployments/Embedding-V1/embeddings?api-version=2023-06-01-preview": unsupported protocol schem

one-api 那边拿到的响应是unsupported protocol scheme,是否可能发起请求端(fastgpt)可能存在不支持的scheme? 复现步骤 启动最新release版本,添加应用后,添加知识库 预期结果

相关截图

ivanberry commented 7 months ago

补充:

直接使用curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings?api-version=2023-05-15\ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY' \ -d '{"input": "Sample Document goes here"}

调用是可以成功的,且验证了渠道,令牌等相关信息

c121914yu commented 7 months ago

oneapi 的问题。吧 oneapi 调通即可,oneapi 使用问题可以但他们 issue 找。