dify icon indicating copy to clipboard operation
dify copied to clipboard

OpenAi Key输入后报错

Open Laggar opened this issue 2 years ago • 7 comments

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)"}

Laggar avatar May 17 '23 12:05 Laggar

看着不像 OpenAI 返回的信息

takatost avatar May 17 '23 12:05 takatost

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

killpanda avatar May 17 '23 13:05 killpanda

免费的接口为啥不代理呢

takatost avatar May 17 '23 13:05 takatost

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

killpanda avatar May 17 '23 13:05 killpanda

封装的API

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

dsbruce avatar May 18 '23 05:05 dsbruce

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

DISABLE_PROVIDER_CONFIG_VALIDATION: 'true'

takatost avatar May 18 '23 05:05 takatost

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

2023Felix avatar May 18 '23 09:05 2023Felix

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

kevinhorse avatar May 31 '23 11:05 kevinhorse

谢谢提示



发件人: 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 avatar Jun 13 '23 00:06 2023Felix

蹲个后续

yxzu avatar Jun 13 '23 08:06 yxzu

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



发件人: 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 avatar Jun 15 '23 01:06 2023Felix

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

isunkit avatar Jul 30 '23 15:07 isunkit