forked from Shinonome/dots-hyprland
minor ai changes
This commit is contained in:
@@ -38,7 +38,7 @@ function replaceapidom(URL) {
|
|||||||
}
|
}
|
||||||
return URL;
|
return URL;
|
||||||
}
|
}
|
||||||
const CHAT_MODELS = ["gpt-3.5-turbo-1106", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613"]
|
const CHAT_MODELS = ["gemini-pro"]
|
||||||
const ONE_CYCLE_COUNT = 3;
|
const ONE_CYCLE_COUNT = 3;
|
||||||
|
|
||||||
class GeminiMessage extends Service {
|
class GeminiMessage extends Service {
|
||||||
@@ -249,7 +249,7 @@ class GeminiService extends Service {
|
|||||||
const session = new Soup.Session();
|
const session = new Soup.Session();
|
||||||
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/gemini-pro:streamGenerateContent?key=${this._key}`), GLib.UriFlags.NONE),
|
uri: GLib.Uri.parse(replaceapidom(`https://generativelanguage.googleapis.com/v1/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)));
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export const ChatGPTSettings = () => MarginRevealer({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
ConfigToggle({
|
ConfigToggle({
|
||||||
icon: 'description',
|
icon: 'model_training',
|
||||||
name: 'Enhancements',
|
name: 'Enhancements',
|
||||||
desc: 'Tells ChatGPT:\n- It\'s a Linux sidebar assistant\n- Be brief and use bullet points',
|
desc: 'Tells ChatGPT:\n- It\'s a Linux sidebar assistant\n- Be brief and use bullet points',
|
||||||
initValue: ChatGPT.assistantPrompt,
|
initValue: ChatGPT.assistantPrompt,
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export const GeminiSettings = () => MarginRevealer({
|
|||||||
className: 'sidebar-chat-settings-toggles',
|
className: 'sidebar-chat-settings-toggles',
|
||||||
children: [
|
children: [
|
||||||
ConfigToggle({
|
ConfigToggle({
|
||||||
icon: 'description',
|
icon: 'model_training',
|
||||||
name: 'Enhancements',
|
name: 'Enhancements',
|
||||||
desc: 'Tells Gemini:\n- It\'s a Linux sidebar assistant\n- Be brief and use bullet points',
|
desc: 'Tells Gemini:\n- It\'s a Linux sidebar assistant\n- Be brief and use bullet points',
|
||||||
initValue: Gemini.assistantPrompt,
|
initValue: Gemini.assistantPrompt,
|
||||||
|
|||||||
Reference in New Issue
Block a user