Skip to content

Commit 1a11faa

Browse files
committed
2 parents 55899a3 + 872b867 commit 1a11faa

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
A GTA SAMP plugin for Chat Bot communication.
77

8-
It works for both [SA-MP](https://www.sa-mp.mp/) and [open.mp](https://www.open.mp/).
8+
It works for both [SA-MP 0.3.7/0.3.DL](https://www.sa-mp.mp/) and [open.mp](https://www.open.mp/).
99

1010
The following Chat Bots API are implemented:
1111
* [Chat GPT](https://platform.openai.com/docs/quickstart)

src/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ static cell AMX_NATIVE_CALL n_SetModel(AMX* amx, cell* params)
279279
return 0;
280280
}
281281

282+
static cell AMX_NATIVE_CALL n_GetChatBotType(AMX* amx, cell* params)
283+
{
284+
paramsLock.lock();
285+
int type = botParams.botType;
286+
paramsLock.unlock();
287+
return type;
288+
}
289+
282290
AMX_NATIVE_INFO natives[] =
283291
{
284292
{ "SetChatBotEncoding", n_SetChatBotEncoding },
@@ -288,6 +296,7 @@ AMX_NATIVE_INFO natives[] =
288296
{ "SetAPIKey", n_SetAPIKey },
289297
{ "SetSystemPrompt", n_SetSystemPrompt },
290298
{ "SetModel", n_SetModel },
299+
{ "GetChatBotType", n_GetChatBotType },
291300
{ 0, 0 }
292301
};
293302

0 commit comments

Comments
 (0)