Skip to content

Commit

Permalink
v1.5.3
Browse files Browse the repository at this point in the history
- Adding a new Gemini model
- Added a new safety_settings
- Update Packages
- - Addition of a credit for Context.ts (Appujet)
  • Loading branch information
LucasB25 committed Jun 1, 2024
1 parent a3b46c8 commit 57be1af
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ REPLICATE_MODEL=bytedance/sdxl-lightning-4step:727e49a643e999d602a896c774a0658ff

#For GEMINI
GEMINI_KEY= #GEMINI key from https://makersuite.google.com/
GEMINI_MODEL=gemini-1.5-pro-latest
GEMINI_MODEL=gemini-1.5-flash-latest # Or gemini-1.5-pro-latest
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AikouAI",
"version": "1.5.0",
"version": "1.5.3",
"description": "A simple AikouAI bot for discord",
"type": "module",
"main": "dist/index.js",
Expand All @@ -23,10 +23,10 @@
},
"homepage": "https://github.com/LucasB25/AikouAI#readme",
"devDependencies": {
"@types/node": "^20.12.12",
"@types/node": "^20.13.0",
"@types/signale": "^1.4.7",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^53.0.0",
Expand Down Expand Up @@ -59,8 +59,8 @@
"@napi-rs/canvas": "^0.1.52",
"discord.js": "^14.15.2",
"dotenv": "^16.4.5",
"replicate": "^0.30.0",
"replicate": "^0.30.1",
"signale": "^1.4.0",
"undici": "^6.18.1"
"undici": "^6.18.2"
}
}
17 changes: 9 additions & 8 deletions src/events/Ai/GeminiAssistance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GoogleGenerativeAI } from '@google/generative-ai';
import { GoogleGenerativeAI, HarmBlockThreshold, HarmCategory } from '@google/generative-ai';
import { ChannelType, Message, TextChannel } from 'discord.js';

import { Bot, Event } from '../../structures/index.js';
Expand Down Expand Up @@ -46,19 +46,20 @@ export default class MessageCreate extends Event {
},
safety_settings: [
{
category: 'HARM_CATEGORY_HARASSMENT',
threshold: 'BLOCK_MEDIUM_AND_ABOVE',
category: HarmCategory.HARM_CATEGORY_HARASSMENT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: 'HARM_CATEGORY_HATE_SPEECH',
threshold: 'BLOCK_MEDIUM_AND_ABOVE',
category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: 'HARM_CATEGORY_SEXUALLY_EXPLICIT',
threshold: 'BLOCK_MEDIUM_AND_ABOVE',
category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: 'HARM_CATEGORY_DANGEROUS_CONTENT',
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
],
} as any);
Expand Down
4 changes: 4 additions & 0 deletions src/structures/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ export default class Context {
return false;
}
}

/**
* The Context.ts file was created by Appujet
*/

0 comments on commit 57be1af

Please sign in to comment.