update ags config

This commit is contained in:
end-4
2025-05-13 21:53:30 +02:00
parent 18356feab7
commit bd80b83881
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -256,7 +256,7 @@ class GeminiService extends Service {
try {
const [bytes] = stream.read_line_finish(res);
const line = this._decoder.decode(bytes);
// console.log(line);
console.log(line);
if (line == '[{') { // beginning of response
aiResponse._rawData += '{';
this.thinking = false;
@@ -299,14 +299,17 @@ class GeminiService extends Service {
"generationConfig": {
"temperature": this._temperature,
},
// "key": this._key,
// "apiKey": this._key,
"tools": [
{
"google_search": {}
}
]
};
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),
uri: GLib.Uri.parse(replaceapidom(`https://generativelanguage.googleapis.com/v1beta/models/${this.modelName}:streamGenerateContent?key=${this._key}`), GLib.UriFlags.NONE),
});
message.request_headers.append('Content-Type', `application/json`);
message.set_request_body_from_bytes('application/json', new GLib.Bytes(JSON.stringify(body)));
+1 -1
View File
@@ -12,7 +12,7 @@ const FIRST_RUN_PATH = `${GLib.get_user_state_dir()}/ags/user/${FIRST_RUN_FILE}`
const FIRST_RUN_FILE_CONTENT = "Just a file to confirm that you have been greeted ;)";
const APP_NAME = "illogical-impulse";
const FIRST_RUN_NOTIF_TITLE = "Welcome!";
const FIRST_RUN_NOTIF_BODY = `First run? 👀 <span foreground="#FF0202" font_weight="bold">CTRL+SUPER+T</span> to pick a wallpaper (or styles will break!)\nFor a list of keybinds, hit <span foreground="#c06af1" font_weight="bold">Super + /</span>.`;
const FIRST_RUN_NOTIF_BODY = `First run? For a list of keybinds, hit <span foreground="#c06af1" font_weight="bold">Super + /</span>.`;
var batteryWarned = false;
async function batteryMessage() {