OpenAi Key输入后报错 #48

Closed
opened 2026-02-21 17:25:45 -05:00 by yindo · 12 comments
Owner

Originally created by @Laggar on GitHub (May 17, 2023).

image
肯定是有效得,本地代码 API调用都是通得

{"result": "error", "error": "Invalid response object from API: '{"object":"error","message":"Only /v1/chat/completions && /v1/embeddings allowed now , your path {/moderations}","code":40301}' (HTTP response code was 403)"}

Originally created by @Laggar on GitHub (May 17, 2023). ![image](https://github.com/langgenius/dify/assets/4003608/cbf2efec-7e48-449c-adf1-554c50ef8c60) 肯定是有效得,本地代码 API调用都是通得 {"result": "error", "error": "Invalid response object from API: '{\"object\":\"error\",\"message\":\"Only /v1/chat/completions && /v1/embeddings allowed now , your path {/moderations}\",\"code\":40301}' (HTTP response code was 403)"}
yindo closed this issue 2026-02-21 17:25:45 -05:00
Author
Owner

@takatost commented on GitHub (May 17, 2023):

看着不像 OpenAI 返回的信息

@takatost commented on GitHub (May 17, 2023): 看着不像 OpenAI 返回的信息
Author
Owner

@killpanda commented on GitHub (May 17, 2023):

这个像是国内代理封装的API,然后没有开放/moderations接口

@killpanda commented on GitHub (May 17, 2023): 这个像是国内代理封装的API,然后没有开放`/moderations`接口
Author
Owner

@takatost commented on GitHub (May 17, 2023):

免费的接口为啥不代理呢

@takatost commented on GitHub (May 17, 2023): 免费的接口为啥不代理呢
Author
Owner

@killpanda commented on GitHub (May 17, 2023):

我试了两家都有这个问题,不知道原因。
我也是一步一步走近科学发现的。。。

@killpanda commented on GitHub (May 17, 2023): 我试了两家都有这个问题,不知道原因。 我也是一步一步走近科学发现的。。。
Author
Owner

@dsbruce commented on GitHub (May 18, 2023):

封装的API

请问有找到原因吗? 我的也是同样的问题

@dsbruce commented on GitHub (May 18, 2023): > 封装的API 请问有找到原因吗? 我的也是同样的问题
Author
Owner

@takatost commented on GitHub (May 18, 2023):

可以按照这位同学提交 PR #85 中的配置项来规避这一问题,增加环境变量配置:

DISABLE_PROVIDER_CONFIG_VALIDATION: 'true'
@takatost commented on GitHub (May 18, 2023): 可以按照这位同学提交 PR #85 中的配置项来规避这一问题,增加环境变量配置: ``` DISABLE_PROVIDER_CONFIG_VALIDATION: 'true' ```
Author
Owner

@2023Felix commented on GitHub (May 18, 2023):

是不是因为是在国内服务器部署的,无法直接连到openai认证?需要科学上网?

@2023Felix commented on GitHub (May 18, 2023): 是不是因为是在国内服务器部署的,无法直接连到openai认证?需要科学上网?
Author
Owner

@kevinhorse commented on GitHub (May 31, 2023):

要修改了代码也不起作用,是不是生效需要修改后有权限的人构造修改镜像才行,能不能有权限的构造一个DISABLE_PROVIDER_CONFIG_VALIDATION: 'True'的 image,

@kevinhorse commented on GitHub (May 31, 2023): 要修改了代码也不起作用,是不是生效需要修改后有权限的人构造修改镜像才行,能不能有权限的构造一个DISABLE_PROVIDER_CONFIG_VALIDATION: 'True'的 image,
Author
Owner

@2023Felix commented on GitHub (Jun 12, 2023):

谢谢提示



发件人: kevinhorse @.>
发送时间: 2023年5月31日 4:08
收件人: langgenius/dify @.
>
抄送: 2023Felix @.>; Comment @.>
主题: Re: [langgenius/dify] OpenAi Key输入后报错 (Issue #80)

要修改了代码也不起作用,是不是生效需要修改后有权限的人构造修改镜像才行,能不能有权限的构造一个DISABLE_PROVIDER_CONFIG_VALIDATION: 'True'的 image,


Reply to this email directly, view it on GitHubhttps://github.com/langgenius/dify/issues/80#issuecomment-1569987620, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6PCCZI7TSKKPNWMZZCYVEDXI4RC3ANCNFSM6AAAAAAYFA4Y4Q.
You are receiving this because you commented.Message ID: @.***>

@2023Felix commented on GitHub (Jun 12, 2023): 谢谢提示 --------------------- ________________________________ 发件人: kevinhorse ***@***.***> 发送时间: 2023年5月31日 4:08 收件人: langgenius/dify ***@***.***> 抄送: 2023Felix ***@***.***>; Comment ***@***.***> 主题: Re: [langgenius/dify] OpenAi Key输入后报错 (Issue #80) 要修改了代码也不起作用,是不是生效需要修改后有权限的人构造修改镜像才行,能不能有权限的构造一个DISABLE_PROVIDER_CONFIG_VALIDATION: 'True'的 image, ― Reply to this email directly, view it on GitHub<https://github.com/langgenius/dify/issues/80#issuecomment-1569987620>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6PCCZI7TSKKPNWMZZCYVEDXI4RC3ANCNFSM6AAAAAAYFA4Y4Q>. You are receiving this because you commented.Message ID: ***@***.***>
Author
Owner

@yxzu commented on GitHub (Jun 13, 2023):

蹲个后续

@yxzu commented on GitHub (Jun 13, 2023): > 蹲个后续
Author
Owner

@2023Felix commented on GitHub (Jun 14, 2023):

当时就想自己搭在微信上玩,然后摸索着使用下国内的服务器。
现在没有在玩这个了
谢谢你的帮助😊



发件人: yxzu @.>
发送时间: 2023年6月13日 1:42
收件人: langgenius/dify @.
>
抄送: 2023Felix @.>; Comment @.>
主题: Re: [langgenius/dify] OpenAi Key输入后报错 (Issue #80)

蹲个后续


Reply to this email directly, view it on GitHubhttps://github.com/langgenius/dify/issues/80#issuecomment-1588830628, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6PCCZPRGV4EWEGK4L3BQV3XLARW3ANCNFSM6AAAAAAYFA4Y4Q.
You are receiving this because you commented.Message ID: @.***>

@2023Felix commented on GitHub (Jun 14, 2023): 当时就想自己搭在微信上玩,然后摸索着使用下国内的服务器。 现在没有在玩这个了 谢谢你的帮助😊 --------------------- ________________________________ 发件人: yxzu ***@***.***> 发送时间: 2023年6月13日 1:42 收件人: langgenius/dify ***@***.***> 抄送: 2023Felix ***@***.***>; Comment ***@***.***> 主题: Re: [langgenius/dify] OpenAi Key输入后报错 (Issue #80) 蹲个后续 — Reply to this email directly, view it on GitHub<https://github.com/langgenius/dify/issues/80#issuecomment-1588830628>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6PCCZPRGV4EWEGK4L3BQV3XLARW3ANCNFSM6AAAAAAYFA4Y4Q>. You are receiving this because you commented.Message ID: ***@***.***>
Author
Owner

@isunkit commented on GitHub (Jul 30, 2023):

使用的API必须得是plus的吗?我的不是plus,绝对原生API,输入后报错

@isunkit commented on GitHub (Jul 30, 2023): 使用的API必须得是plus的吗?我的不是plus,绝对原生API,输入后报错
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#48