diff --git a/docs/usage/proxy.md b/docs/usage/proxy.md new file mode 100644 index 00000000..2f8eb95d --- /dev/null +++ b/docs/usage/proxy.md @@ -0,0 +1,21 @@ +# Proxy Support + +SGPT supports proxying requests through SOCKS and HTTP proxies. This is useful for environments where direct internet +access is not allowed, but proxying is allowed. + +You can configure SGPT to use a proxy using the `http_proxy` and `https_proxy` environment variables. + +```bash +$ export http_proxy=http://proxy.example.com:8080 +$ export https_proxy=http://proxy.example.com:8080 +$ sgpt "say hello" +Hello! How can I assist you today? +``` + +Exceptions can be made for specific hosts by setting the `no_proxy` environment variable. + +```bash +$ export no_proxy=example.com +$ sgpt "say hello" +Hello! How can I assist you today? +``` diff --git a/mkdocs.yml b/mkdocs.yml index 4d5418fe..2b762e51 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -72,5 +72,6 @@ nav: - Chat: 'usage/chat.md' - Docker: 'usage/docker.md' - Personas: 'usage/personas.md' + - Proxy Support: 'usage/proxy.md' - Configuration: 'configuration.md' - Examples: 'examples.md' \ No newline at end of file