Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
MoePotatoChan committed Jan 14, 2025
1 parent ccb3d07 commit 40543e9
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions app/client/platforms/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,33 @@ export class GeminiProApi implements LLMApi {
const requestPayload = {
contents: messages,
generationConfig: {
// stopSequences: [
// "Title"
// ],
temperature: modelConfig.temperature,
maxOutputTokens: modelConfig.max_tokens,
topP: modelConfig.top_p,
// "topK": modelConfig.top_k,
},
test: {
// stopSequences: [
// "Title"
// ],
temperature: modelConfig.temperature,
maxOutputTokens: modelConfig.max_tokens,
topP: modelConfig.top_p,
// "topK": modelConfig.top_k,
},

tools: [
{
googleSearch: {}
}
],
safetySettings: [
{
category: "HARM_CATEGORY_DANGEROUS_CONTENT",
threshold: "BLOCK_NONE"
},
{
category: "HARM_CATEGORY_HATE_SPEECH",
threshold: "BLOCK_NONE"
},
{
category: "HARM_CATEGORY_HARASSMENT",
threshold: "BLOCK_NONE"
},
{
category: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
threshold: "BLOCK_NONE"
}
]
};

let shouldStream = !!options.config.stream;
Expand Down

0 comments on commit 40543e9

Please sign in to comment.