最終更新:2025-01-21 (火) 21:55:52 (175d)  

M5ModuleLLM
Top / M5ModuleLLM

リポジトリ

devブランチ

APIドキュメント

M5ModuleLLM/バージョン?

M5ModuleLLM 1.3

  • 大きいモデルだとLLMのロードががタイムアウトするバグがある

クラス

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

  • Voice assistant preset base on class M5ModuleLLM

関数

  • M5ModuleLLM_VoiceAssistant.voice_assistant.begin?(KWS)
    M5ModuleLLM_VoiceAssistant.onAsrDataInput?
    M5ModuleLLM_VoiceAssistant.onLlmDataInput?

M5ModuleLLM/サンプル

メモ

  • 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);
    });

関連