Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl可以成功请求,但通过openai sdk请求无法成功:502 #1897

Open
5 tasks done
qiuchen001 opened this issue Oct 28, 2024 · 0 comments
Open
5 tasks done
Labels
bug Something isn't working

Comments

@qiuchen001
Copy link

qiuchen001 commented Oct 28, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
通过中转请求geminiAPI,可以通过curl请求,但是通过openai sdk请求无法成功,结果为:openai.InternalServerError: Error code: 502

复现步骤
渠道信息为:
image

curl请求的参数及结果如下:
image

openai-sdk的请求参数及结果如下:
openai==1.52.2

代码;
image
结果:
image

debug的过程参数:
image

预期结果

通过openai sdk请求,应该可以正常请求,并返回结果

@qiuchen001 qiuchen001 added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant