最終更新:2024-11-29 (金) 09:21:44 (8d)  

M5ModuleLLM
Top / M5ModuleLLM

https://github.com/m5stack/M5Module-LLM

APIドキュメント

クラス

M5ModuleLLM

関数

  • M5ModuleLLM.beginInitializes the UART configuration of the LLM Module.
    M5ModuleLLM.checkConnectionSends sys.ping command to check the connection status of the LLM Module.
    M5ModuleLLM.update?Fetches UART response data from the LLM Module. This API should be included in the Loop for continuous execution.

メンバ

  • m5_module_llm::ApiSys?M5ModuleLLM.sys?
    m5_module_llm::ApiLlm?M5ModuleLLM.llm
    m5_module_llm::ApiAudio?M5ModuleLLM.audio?
    m5_module_llm::ApiTts?M5ModuleLLM.tts?
    m5_module_llm::ApiKws?M5ModuleLLM.kws?
    m5_module_llm::ApiAsr?M5ModuleLLM.asr?
    m5_module_llm::ModuleMsg?M5ModuleLLM.msg?
    m5_module_llm::ModuleComm?M5ModuleLLM.comm

M5ModuleLLM_VoiceAssistant?

サンプル

メモ

  • M5ModuleLLM module_llm
    
    Serial2.begin(115200, SERIAL_8N1, 16, 17);  // Basic
    // Serial2.begin(115200, SERIAL_8N1, 13, 14);  // Core2
    // Serial2.begin(115200, SERIAL_8N1, 18, 17);  // CoreS3
    
    /* Init module */
    module_llm.begin(&Serial2);
    
    module_llm.checkConnection()
    
    module_llm.sys.reset();
    
    llm_work_id = module_llm.llm.setup();
    
    module_llm.llm.inferenceAndWaitResult(llm_work_id, received_question.c_str(), [](String& result) {
        /* Show result on screen and usb serial */
        M5.Display.printf("%s", result.c_str());
        CommSerialPort.print(result);
    });