forked from Shinonome/dots-hyprland
update ags config
This commit is contained in:
@@ -256,7 +256,7 @@ class GeminiService extends Service {
|
|||||||
try {
|
try {
|
||||||
const [bytes] = stream.read_line_finish(res);
|
const [bytes] = stream.read_line_finish(res);
|
||||||
const line = this._decoder.decode(bytes);
|
const line = this._decoder.decode(bytes);
|
||||||
// console.log(line);
|
console.log(line);
|
||||||
if (line == '[{') { // beginning of response
|
if (line == '[{') { // beginning of response
|
||||||
aiResponse._rawData += '{';
|
aiResponse._rawData += '{';
|
||||||
this.thinking = false;
|
this.thinking = false;
|
||||||
@@ -299,14 +299,17 @@ class GeminiService extends Service {
|
|||||||
"generationConfig": {
|
"generationConfig": {
|
||||||
"temperature": this._temperature,
|
"temperature": this._temperature,
|
||||||
},
|
},
|
||||||
// "key": this._key,
|
"tools": [
|
||||||
// "apiKey": this._key,
|
{
|
||||||
|
"google_search": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
const proxyResolver = new Gio.SimpleProxyResolver({ 'default-proxy': userOptions.ai.proxyUrl });
|
const proxyResolver = new Gio.SimpleProxyResolver({ 'default-proxy': userOptions.ai.proxyUrl });
|
||||||
const session = new Soup.Session({ 'proxy-resolver': proxyResolver });
|
const session = new Soup.Session({ 'proxy-resolver': proxyResolver });
|
||||||
const message = new Soup.Message({
|
const message = new Soup.Message({
|
||||||
method: 'POST',
|
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.request_headers.append('Content-Type', `application/json`);
|
||||||
message.set_request_body_from_bytes('application/json', new GLib.Bytes(JSON.stringify(body)));
|
message.set_request_body_from_bytes('application/json', new GLib.Bytes(JSON.stringify(body)));
|
||||||
|
|||||||
@@ -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 FIRST_RUN_FILE_CONTENT = "Just a file to confirm that you have been greeted ;)";
|
||||||
const APP_NAME = "illogical-impulse";
|
const APP_NAME = "illogical-impulse";
|
||||||
const FIRST_RUN_NOTIF_TITLE = "Welcome!";
|
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;
|
var batteryWarned = false;
|
||||||
async function batteryMessage() {
|
async function batteryMessage() {
|
||||||
|
|||||||
Reference in New Issue
Block a user