forked from Shinonome/dots-hyprland
Merge branch 'main' into patch-1
This commit is contained in:
@@ -192,6 +192,9 @@ class GeminiService extends Service {
|
||||
this._usingHistory = value;
|
||||
}
|
||||
|
||||
get safe() { return this._safe }
|
||||
set safe(value) { this._safe = value; }
|
||||
|
||||
get temperature() { return this._temperature }
|
||||
set temperature(value) { this._temperature = value; }
|
||||
|
||||
@@ -282,13 +285,13 @@ class GeminiService extends Service {
|
||||
const body =
|
||||
{
|
||||
"contents": this._messages.map(msg => { let m = { role: msg.role, parts: msg.parts }; return m; }),
|
||||
// "safetySettings": [
|
||||
// { category: "HARM_CATEGORY_DEROGATORY", threshold: "BLOCK_NONE", },
|
||||
// { category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_NONE", },
|
||||
// { category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_NONE", },
|
||||
// { category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_NONE", },
|
||||
// { category: "HARM_CATEGORY_UNSPECIFIED", threshold: "BLOCK_NONE", },
|
||||
// ],
|
||||
"safetySettings": this._safe ? [] : [
|
||||
// { category: "HARM_CATEGORY_DEROGATORY", threshold: "BLOCK_NONE", },
|
||||
{ category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_NONE", },
|
||||
{ category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_NONE", },
|
||||
{ category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_NONE", },
|
||||
// { category: "HARM_CATEGORY_UNSPECIFIED", threshold: "BLOCK_NONE", },
|
||||
],
|
||||
"generationConfig": {
|
||||
"temperature": this._temperature,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user