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 proxy support #1166

Merged
merged 2 commits into from
Oct 27, 2023
Merged

add proxy support #1166

merged 2 commits into from
Oct 27, 2023

Conversation

catmeowjiao
Copy link
Contributor

@catmeowjiao catmeowjiao commented Oct 26, 2023

This Pull request made the following changes:

  1. Used the config.json file to add proxy support to the API and GUI.
    By meowjiao
    Using ChatGPT from Chinese translate to English

@catmeowjiao
Copy link
Contributor Author

i will add proxy support for api, please wait 1~2 days, thanks!

@catmeowjiao
Copy link
Contributor Author

please edit README.md, thanks!

@catmeowjiao
Copy link
Contributor Author

please wait, api proxy coming soon

@catmeowjiao
Copy link
Contributor Author

api proxy is testing

@catmeowjiao
Copy link
Contributor Author

test done, i'll submit pr, please wait

@catmeowjiao
Copy link
Contributor Author

ok

@xtekky xtekky merged commit 0e700a5 into xtekky:main Oct 27, 2023
@L-Chris
Copy link

L-Chris commented Oct 31, 2023

Not work, Can you give me a json example?

@catmeowjiao
Copy link
Contributor Author

Not work, Can you give me a json example?

@L-Chris json实例如下:

{
    "proxy": "你的代理地址,如http://127.0.0.1:7890"
}

@piyushpranjal03
Copy link

Hey @catmeowjiao,

Thanks for adding the proxy support.
Just wanted to check how this can be used.
I can't find the usage in README file.

This is what I was trying:

response = g4f.ChatCompletion.create(
        model=g4f.models.default,
        provider=You,
        messages=[{"role": "user", "content": content}],
        proxy="http://107.152.47.85:9797",
        timeout=10
)

Can you give me some directions?

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.

4 participants