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

Add chat model open ai proxy url params #3153

Conversation

thanhtung100397
Copy link
Contributor

@thanhtung100397 thanhtung100397 commented Sep 5, 2024

Add Proxy URL option for Open AI chat model

image

@HenryHengZJ
Copy link
Contributor

awesome! are you able to test is using proxy?

@wangsp188
Copy link

great, i will try

Add Proxy URL option for Open AI chat model

image

@thanhtung100397
Copy link
Contributor Author

I have setup a squid server as proxy and it's worked, hope this can help anyone got this open ai api error: unsupported_country_region_territory

@wangsp188
Copy link

I have setup a squid server as proxy and it's worked, hope this can help anyone got this open ai api error: unsupported_country_region_territory

what time the commit will merge to main branch?

@thanhtung100397
Copy link
Contributor Author

I have setup a squid server as proxy and it's worked, hope this can help anyone got this open ai api error: unsupported_country_region_territory

what time the commit will merge to main branch?

i dont have any permission to merge so anyone can help?

Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HenryHengZJ HenryHengZJ merged commit 40a1064 into FlowiseAI:main Sep 9, 2024
2 checks passed
@wangsp188
Copy link

wangsp188 commented Sep 10, 2024

thanks @thanhtung100397

what to use the param?
i have build a proxy for openai.
image

this is error log
2024-09-10 09:25:36 [INFO]: [server]: Chatflow dc4c428f-5278-465e-ad9a-bf6b3bdb5074 added into ChatflowPool
2024-09-10 09:27:01 [ERROR]: [server]: Error: Connection error.
Error: Connection error.
at OpenAI.makeRequest (/Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/[email protected][email protected]/node_modules/openai/core.js:304:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/@langchain[email protected][email protected]_langchain@0.2.11_@aws-sdk[email protected]_@aws-sdk_xdehwmr5gttavnvrwzf5jjmfv4/node_modules/@langchain/openai/dist/chat_models.cjs:760:29
at async RetryOperation._fn (/Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/[email protected]/node_modules/p-retry/index.js:50:12)

@thanhtung100397
Copy link
Contributor Author

thanks @thanhtung100397

what to use the param? i have build a proxy for openai. image

this is error log 2024-09-10 09:25:36 [INFO]: [server]: Chatflow dc4c428f-5278-465e-ad9a-bf6b3bdb5074 added into ChatflowPool 2024-09-10 09:27:01 [ERROR]: [server]: Error: Connection error. Error: Connection error. at OpenAI.makeRequest (/Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/[email protected][email protected]/node_modules/openai/core.js:304:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/@langchain[email protected][email protected]_langchain@0.2.11_@aws-sdk[email protected]_@aws-sdk_xdehwmr5gttavnvrwzf5jjmfv4/node_modules/@langchain/openai/dist/chat_models.cjs:760:29 at async RetryOperation._fn (/Users/dexwang/sourcecode/Flowise/node_modules/.pnpm/[email protected]/node_modules/p-retry/index.js:50:12)

You can follow my step

image

image

Here is the sample input for proxy url

(proxy without user/pass): http://127.0.0.1:3128
(proxy with user/pass): http://user:[email protected]:3128

This was referenced Sep 19, 2024
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

Successfully merging this pull request may close these issues.

3 participants