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

如何使用自己的bing cookie来调用本项目的openai api? #141

Open
yunshaochu opened this issue Feb 23, 2024 · 0 comments
Open

Comments

@yunshaochu
Copy link

yunshaochu commented Feb 23, 2024

现在不填写自己的cookie就无法对bing提问,但我不清楚本地部署本项目后,要如何在调用openai api时附带自己的cookie或者header。

我看到docker方式部署似乎可以填写BING_HEADER,但我把-e BING_HEADER=xxxx用到本地部署上,却只会显示npm WARN invalid config before="BING_HEADER=XXXX",所以是要在系统上配置BING_HEADER为环境变量吗?

我在ipynb中设置了bing header环境变量后,依旧不能使用openai api格式:
import os
os.environ['BING_HEADER'] = 'XXXX'

!npm i
!npm run build
!npm run start

print(os.environ.get("BING_HEADER")) # 可以打印出header


我好像知道该怎么问了:如何在本地(以及codeSandBox)全局配置cookie?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant