mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 07:19:27 -05:00
Added proxy url setting in user options
This commit is contained in:
@@ -10,6 +10,7 @@ let configOptions = {
|
||||
'enhancements': true,
|
||||
'useHistory': true,
|
||||
'writingCursor': " ...", // Warning: Using weird characters can mess up Markdown rendering
|
||||
'proxyUrl': '', // Can be "socks5://127.0.0.1:9050" or "http://127.0.0.1:8080" for example. Leave it blank if you don't need it.
|
||||
},
|
||||
'animations': {
|
||||
'choreographyDelay': 35,
|
||||
|
||||
@@ -299,7 +299,8 @@ class GeminiService extends Service {
|
||||
// "apiKey": this._key,
|
||||
};
|
||||
|
||||
const session = new Soup.Session();
|
||||
const proxyResolver = new Gio.SimpleProxyResolver({ 'default-proxy': userOptions.ai.proxyUrl });
|
||||
const session = new Soup.Session({ 'proxy-resolver': proxyResolver });
|
||||
const message = new Soup.Message({
|
||||
method: 'POST',
|
||||
uri: GLib.Uri.parse(replaceapidom(`https://generativelanguage.googleapis.com/v1/models/${this.modelName}:streamGenerateContent?key=${this._key}`), GLib.UriFlags.NONE),
|
||||
|
||||
@@ -246,7 +246,8 @@ class GPTService extends Service {
|
||||
stream: true,
|
||||
};
|
||||
|
||||
const session = new Soup.Session();
|
||||
const proxyResolver = new Gio.SimpleProxyResolver({ 'default-proxy': userOptions.ai.proxyUrl });
|
||||
const session = new Soup.Session({ 'proxy-resolver': proxyResolver });
|
||||
const message = new Soup.Message({
|
||||
method: 'POST',
|
||||
uri: this._url,
|
||||
|
||||
Reference in New Issue
Block a user