minor ai changes

This commit is contained in:
end-4
2024-02-02 15:28:40 +07:00
parent eaaeee957d
commit 948d29e3eb
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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)));
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,