forked from Shinonome/dots-hyprland
Added proxy url setting in user options
This commit is contained in:
@@ -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