From 34516494c9b64394df60afaf30e9a6a733093b7d Mon Sep 17 00:00:00 2001 From: Katzu09 Date: Sun, 22 Jun 2025 01:39:17 +0800 Subject: [PATCH] Add GetChatBotType native function to retrieve bot type --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 85f4539..ddfc88e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -272,6 +272,14 @@ static cell AMX_NATIVE_CALL n_SetModel(AMX* amx, cell* params) return 0; } +static cell AMX_NATIVE_CALL n_GetChatBotType(AMX* amx, cell* params) +{ + paramsLock.lock(); + int type = botParams.botType; + paramsLock.unlock(); + return type; +} + AMX_NATIVE_INFO natives[] = { { "SetChatBotEncoding", n_SetChatBotEncoding }, @@ -281,6 +289,7 @@ AMX_NATIVE_INFO natives[] = { "SetAPIKey", n_SetAPIKey }, { "SetSystemPrompt", n_SetSystemPrompt }, { "SetModel", n_SetModel }, + { "GetChatBotType", n_GetChatBotType }, { 0, 0 } };