Skip to content

Commit

Permalink
style: add type annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
adolphnov committed Dec 16, 2024
1 parent c7c00f5 commit 594670d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/agent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,13 @@ export async function createLlmModel(model: string, context: AgentUserConfig) {
if (!model_id) {
model_id = context[`${agent.toUpperCase()}_CHAT_MODEL`];
}
const GOOGLE_SAFETY = [
const GOOGLE_SAFETY: { category: 'HARM_CATEGORY_UNSPECIFIED' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_CIVIC_INTEGRITY'; threshold: 'BLOCK_NONE' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' }[] = [
{ category: 'HARM_CATEGORY_UNSPECIFIED', threshold: 'BLOCK_NONE' },
{ category: 'HARM_CATEGORY_DANGEROUS_CONTENT', 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_SEXUALLY_EXPLICIT', threshold: 'BLOCK_NONE' },
];

switch (agent) {
case 'openai':
Expand Down

0 comments on commit 594670d

Please sign in to comment.