diff --git a/.env.example b/.env.example index 50124f1..a07b15d 100644 --- a/.env.example +++ b/.env.example @@ -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 \ No newline at end of file +GEMINI_MODEL=gemini-1.5-flash-latest # Or gemini-1.5-pro-latest \ No newline at end of file diff --git a/package.json b/package.json index e4dfb63..4f587cd 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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" } } diff --git a/src/events/Ai/GeminiAssistance.ts b/src/events/Ai/GeminiAssistance.ts index 417cc33..8b2ce7c 100644 --- a/src/events/Ai/GeminiAssistance.ts +++ b/src/events/Ai/GeminiAssistance.ts @@ -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'; @@ -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); diff --git a/src/structures/Context.ts b/src/structures/Context.ts index 580ede8..a288cf3 100644 --- a/src/structures/Context.ts +++ b/src/structures/Context.ts @@ -103,3 +103,7 @@ export default class Context { return false; } } + +/** + * The Context.ts file was created by Appujet + */ \ No newline at end of file