最終更新:2025-01-19 (日) 11:30:42 (20d)  

Module LLM/API
Top / Module LLM / API

ドキュメント

動作の流れ

M5Stack

Module LLM

M5Stack利用時の動作

M5ModuleLLMのAPIの関数の内部動作

M5ModuleLLM.llm.setup(m5_module_llm::ApiLlmSetupConfig_t) (例)

  • M5ModuleLLM.msg.sendCmdAndWaitToTakeMsg?(送りたいJSON)

M5ModuleLLM.msg.sendCmd?

  • M5ModuleLLM.msg.sendCmd?
  • M5ModuleLLM.msg.sendCmdAndWaitToTakeMsg?

M5ModuleLLM.comm.sendCmd?

パケット

  • {
     "request_id": "001",
     "work_id": "llm.1001",
     "action": "taskinfo",
     "object": "None",
     "data":"None"
    }

フィールド

  • request_idThe session ID used to distinguish context, corresponding to the service invocation and response.
    work_idWhen calling the service unit, enter keyword + ID, e.g., llm.xxxx(id).
    When initializing the service unit in setup, enter the unit name keyword without the ID, e.g., llm.
    actionThe method being called, corresponding to the unit method. Please refer to the unit list below.
    objectSets the structure of the parameters passed in data. Refer to the parameter structure list for all parameter structures. If there are no parameters, this can be omitted.
    dataParameters to be transmitted; can be omitted if there are no parameters.

コマンド

SYS

AUDIO

KWS

ASR

LLM

  • メソッド (action)パラメータの型 (object)
    Module LLM/API/LLM/setup?llm.setup?
    Module LLM/API/LLM/inference?llm.utf-8.stream?
    Module LLM/API/LLM/pause?
    Module LLM/API/LLM/work?
    Module LLM/API/LLM/exit?
    Module LLM/API/LLM/taskinfo?

Pythonでネットワーク経由でStackFlowを叩く方法