mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-03 17:18:51 +01:00
fix(Bing): Use full cookies string instead of just _U cookie (#369)
This commit is contained in:
parent
112c6c5b19
commit
634849ec12
3 changed files with 20 additions and 17 deletions
|
|
@ -59,8 +59,9 @@ OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-0301,text-davinci-003,gpt-4
|
|||
##########################
|
||||
|
||||
# Also used for Sydney and jailbreak
|
||||
|
||||
# BingAI Tokens: the "_U" cookies value from bing.com
|
||||
# As of 5/23/23, to use Bing, you will need your full cookie string from bing.com. Use dev tools or an extension while
|
||||
# logged into the site to view it in your network request Cookie header value. For full instructions, see my comment here:
|
||||
# https://github.com/waylaidwanderer/node-chatgpt-api/issues/378#issuecomment-1559868368
|
||||
# Set to "user_provided" to allow the user to provide its token from the UI.
|
||||
# Leave it blank to disable this endpoint.
|
||||
BINGAI_TOKEN="user_provided"
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ const askBing = async ({
|
|||
|
||||
const bingAIClient = new BingAIClient({
|
||||
// "_U" cookie from bing.com
|
||||
userToken:
|
||||
process.env.BINGAI_TOKEN == 'user_provided' ? token : process.env.BINGAI_TOKEN ?? null,
|
||||
// userToken:
|
||||
// process.env.BINGAI_TOKEN == 'user_provided' ? token : process.env.BINGAI_TOKEN ?? null,
|
||||
// If the above doesn't work, provide all your cookies as a string instead
|
||||
// cookies: '',
|
||||
cookies: process.env.BINGAI_TOKEN == 'user_provided' ? token : process.env.BINGAI_TOKEN ?? null,
|
||||
debug: false,
|
||||
cache: store,
|
||||
host: process.env.BINGAI_HOST || null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue