esp-ai
Version:
Provide a complete set of AI dialogue solutions for your development board, including but not limited to the IAT+LLM+TTS integration solution for the ESP32 series development board. | 为你的开发板提供全套的AI对话方案,包括但不限于 `ESP32` 系列开发板的 `IAT+LLM+TTS` 集成方案。
11 lines • 404 B
JavaScript
function gen_intention_prompt(intention = []){
const arrKey = intention.filter(item => Array.isArray(item.key));
const strKey = arrKey.map(item => `当用户要求${item.key.join("或")}时,回复"${item.message || "好的"}"`).join(", ");
return [
{
role: "system",
content: `${strKey}`
}
];
}
module.exports = gen_intention_prompt