mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
commit
0d117dd557
1 changed files with 7 additions and 5 deletions
|
|
@ -184,11 +184,6 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
||||||
* @type Array<Content>
|
* @type Array<Content>
|
||||||
*/
|
*/
|
||||||
contents: history,
|
contents: history,
|
||||||
system_instruction: {
|
|
||||||
parts: {
|
|
||||||
text: systemMessage
|
|
||||||
}
|
|
||||||
},
|
|
||||||
safetySettings: [
|
safetySettings: [
|
||||||
{
|
{
|
||||||
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
|
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
|
||||||
|
|
@ -219,6 +214,13 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
||||||
},
|
},
|
||||||
tools: []
|
tools: []
|
||||||
}
|
}
|
||||||
|
if (systemMessage) {
|
||||||
|
body.system_instruction = {
|
||||||
|
parts: {
|
||||||
|
text: systemMessage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.tools?.length > 0) {
|
if (this.tools?.length > 0) {
|
||||||
body.tools.push({
|
body.tools.push({
|
||||||
function_declarations: this.tools.map(tool => tool.function())
|
function_declarations: this.tools.map(tool => tool.function())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue