-
Notifications
You must be signed in to change notification settings - Fork 10
Description
After sending request (by using command aichat, see below) my server crashes after about 30 seconds. System is Ubuntu 24.04. Groq API key is created and API is configured exactly as in your manual. samp-chatbot.inc is included. Crashlog is below. Tried different encodings - no result.
[17:19:51] [debug] Server crashed due to an unknown error
[17:19:51] [debug] Native backtrace:
[17:19:51] [debug] #0 f32928b6 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so
[17:19:51] [debug] #1 f328a120 in _ZN18CrashDetectHandler20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so
[17:19:51] [debug] #2 f328a886 in _ZN18CrashDetectHandler20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so
[17:19:51] [debug] #3 f328af96 in _ZN18CrashDetectHandler7OnCrashERKN2os7ContextE () in plugins/crashdetect.so
[17:19:51] [debug] #4 f3291f82 in ?? () in plugins/crashdetect.so
[17:19:51] [debug] #5 f3aff5a0 in __kernel_rt_sigreturn () in linux-gate.so.1
[17:19:51] [debug] Registers:
[17:19:51] [debug] EAX: 00000000 EBX: f1decff4 ECX: 00002711 EDX: 00000006
[17:19:51] [debug] ESI: f1decff4 EDI: f230bd90 EBP: f2cbf1d8 ESP: f2cbf05c
[17:19:51] [debug] EIP: 00000000 EFLAGS: 00210246
[17:19:51] [debug] Stack:
[17:19:51] [debug] ESP+00000000: f186dcd4 f1bdb0e8 f1be09b0 f2cbf0e0
[17:19:51] [debug] ESP+00000020: 000000fc 00000108 f2cbf0e8 00000006
[17:19:51] [debug] ESP+00000040: f2cbf148 f31e5b64 a357710a 093be001
[17:19:51] [debug] ESP+00000060: f2cbf124 f3b35b8c 00000006 093be260
[17:19:51] [debug] ESP+00000080: f352aef2 f2cbf0e8 00000000 00000000
[17:19:51] [debug] ESP+000000a0: 0000002f 0000002f f3589b16 f2300798
[17:19:51] [debug] ESP+000000c0: 67617373 3a227365 00227b5b 00000002
[17:19:51] [debug] ESP+000000e0: 00000080 f2cbf148 00000002 00006968
[17:19:51] [debug] ESP+00000100: f2300018 00000076 f371fe34 f2cbfb40
[17:19:51] [debug] ESP+00000120: ffffffc0 f2cbf320 f36771d5 f3ae7ff4
[17:19:51] [debug] ESP+00000140: f390665b 00000076 f35e11c0 fffffffc
[17:19:51] [debug] ESP+00000160: f3580e92 f1df6248 00000001 f39b784d
[17:19:51] [debug] ESP+00000180: f1883d41 f2cbf288 f2cbf2ec f2cbf320
[17:19:51] [debug] ESP+000001a0: 00000000 00000000 f2cbf24c 00000000
[17:19:51] [debug] ESP+000001c0: f2cbf278 f1df6248 f1df6314 f2cbf2ec
[17:19:51] [debug] ESP+000001e0: f2cbf250 00000000 00000000 00000000
[17:19:51] [debug] ESP+00000200: 00000002 00006968 f2cbf368 0000001a
[17:19:51] [debug] ESP+00000220: f371fe34 f2cbf2a4 f2cbf3b7 f2cbf290
[17:19:51] [debug] ESP+00000240: 00000000 00000000 f2cbf394 f2cbf3ae
[17:19:51] [debug] ESP+00000260: 00000000 00000000 00000000 00000000
[17:19:51] [debug] ESP+00000280: f358b87a f2300608 00000020 00000000
[17:19:51] [debug] ESP+000002a0: 00000000 00000000 00000000 f358b7ef
[17:19:51] [debug] ESP+000002c0: f358bc10 f2300660 00000038 00000038
[17:19:51] [debug] ESP+000002e0: 00000075 00000075 f24c0000 f2cbf394
[17:19:51] [debug] ESP+00000300: 372d3361 382d6230 00323931 00000002
[17:19:51] [debug] ESP+00000320: 00000002 093be440 f3ae7ff4 f2cbf3b8
[17:19:51] [debug] ESP+00000340: 72687470 20646165 63617473 33203a6b
[17:19:51] [debug] ESP+00000360: f357bfe7 093be440 00000000 f2cbffb4
[17:19:51] [debug] ESP+00000380: f2cbfb40 f2cbfbac 53053053 f2cbfb40
[17:19:51] [debug] ESP+000003a0: 00000000 00000000 00000000 00000000
[17:19:51] [debug] ESP+000003c0: f357bc90 00000000 003d0f00 00000000
[17:19:51] [debug] ESP+000003e0: 00000000 00000000 00000000 00000000
[17:19:51] [debug] Loaded modules:
[17:19:51] [debug] 00000000 - 00194f0b samp03svr
[17:19:51] [debug] f3aff000 - f3b00908 linux-gate.so.1
[17:19:51] [debug] f3af1000 - f3af1adc /lib/i386-linux-gnu/libdl.so.2
[17:19:51] [debug] f3aec000 - f3aed17c /lib/i386-linux-gnu/libpthread.so.0
[17:19:51] [debug] f386d000 - f3af98f2 /lib/i386-linux-gnu/libstdc++.so.6
[17:19:51] [debug] f3763000 - f386b664 /lib/i386-linux-gnu/libm.so.6
[17:19:51] [debug] f372b000 - f3760f88 /lib/i386-linux-gnu/libgcc_s.so.1
[17:19:51] [debug] f34ef000 - f37328dd /lib/i386-linux-gnu/libc.so.6
[17:19:51] [debug] f3b01000 - f3b3562d /lib/ld-linux.so.2
[17:19:51] [debug] f34ce000 - f34e9daf plugins/rustext.so
[17:19:51] [debug] f32b8000 - f34d9734 plugins/FCNPC-DL.so
[17:19:51] [debug] f3273000 - f32b73ac plugins/crashdetect.so
[17:19:51] [debug] f326c000 - f3270af0 plugins/dc_cmd.so
[17:19:51] [debug] f3264000 - f326b2bd plugins/timerfix.so
[17:19:51] [debug] f325f000 - f3260074 /lib/i386-linux-gnu/librt.so.1
[17:19:51] [debug] f2ebf000 - f325fb1a plugins/mysql_static.so
[17:19:51] [debug] f24af000 - f24be1d4 plugins/sscanf.so
[17:19:51] [debug] f204a000 - f2103403 plugins/streamer.so
[17:19:51] [debug] f1df9000 - f2050dac plugins/YSF_DL_static.so
[17:19:51] [debug] f24aa000 - f24ac858 plugins/bscrashfix.so
[17:19:51] [debug] f17b5000 - f1e46864 plugins/samp-chatbot.so
[17:19:51] [debug] f242d000 - f242f458 /usr/lib/i386-linux-gnu/gconv/CP1251.so
Server.cfg:
echo Executing Server Config...
lanmode 1
rcon 1
rcon_password somepassword
maxplayers 81
port 7777
hostname Test server [0.3.DL]
gamemode0 datfeel 1
filterscripts
plugins rustext.so FCNPC-DL.so crashdetect.so dc_cmd.so timerfix.so mysql_static.so sscanf.so streamer.so YSF_DL_static.so bscrashfix.so samp-chatbot.so
announce 1
query 1
artwork Yes
artpath models
useartwork 1
ackslimit 50000
messageholelimit 50000
maxnpc 50
audiomsgoff 1
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
In main() function:
SetChatBotEncoding(W1251);
SelectChatBot(LLAMA);
SetModel("llama3-70b-8192");
SetAPIKey(API_KEY);
SetSystemPrompt("You are average man");
Other functions:
public OnChatBotResponse(prompt[], response[], id)
{
new string[1500];
//from a player
if(id >= 0 && id < MAX_PLAYERS)
{
format(lastResponses[id], 1024, "%s", response);
format(string, sizeof(string), "AI: %s", response);
SendClientMessage(id, COLOR_ONE, string);
}
else if(id == GLOBAL_REQUEST) //global
{
format(lastGlobalResponse, 2048, "%s", response);
format(string, sizeof(string), "AI (global): %s", response);
SendClientMessageToAll(COLOR_ONE, string);
}
}
CMD:aichat(playerid, params[])
{
if(player_info_pAdmin[playerid] < 1) return SendClientOOCMessage(playerid, COLOR_WARN, "You are not admin");
if(isnull(params)) return SendClientMessage(playerid, COLOR_WARN, "Use: /aichat [text]");
if(strlen(params) > 128) return SendClientOOCMessage(playerid, COLOR_WARN, "Text is too big");
RequestToChatBot(params, playerid);
SendClientOOCMessage(playerid, COLOR_TWO, "Request sent.");
return 1;
After using aichat I receive "Request sent" and after 30 seconds server crashes.