#include #include #include #include #include DllCall("User32.dll", "bool", "SetProcessDpiAwarenessContext" , "HWND", "DPI_AWARENESS_CONTEXT" -2) Opt("GUIOnEventMode", 1) Local $hMainGUI = GUICreate("Dllama_AutoIt_GUI", 925, 950) GUISetOnEvent($GUI_EVENT_CLOSE, "terminate_app") Local $start_thinking = GUICtrlCreateButton("Думай и отвечай, ИИ!", 350, 890, 250, 50) Local $place_for_question = GUICtrlCreateInput("Напишите здесь вопрос для ИИ.", 10, 15, 900, 40) Local $place_for_answer = GUICtrlCreateEdit("Здесь ИИ напишет ответ на Ваш вопрос.", 10, 80, 900, 800, $ES_MULTILINE) GUICtrlSetOnEvent($start_thinking, "get_answer") GUICtrlSetFont($place_for_question, 14) GUICtrlSetFont($place_for_answer, 14) GUICtrlSetFont($start_thinking, 14) GUISetState(@SW_SHOW, $hMainGUI) While 1 Sleep(100) WEnd Func get_answer() Local $question $question = GUICtrlRead($place_for_question) Local $hDLL = DllOpen("Dllama.dll") Local $answer = DllCall($hDLL, "str:cdecl", "Dllama_Simple_Inference", "str", "C:\LLM\gguf\", "str", "models.json", "str", "phi3:4B:Q4", "boolean", False, "uint", 1024, "int", 27, "str", $question) GUICtrlSetData($place_for_answer, BinaryToString($answer[0], $SB_UTF8)) DllClose($hDLL) EndFunc Func terminate_app() Exit EndFunc