-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
284 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
[ | ||
{ | ||
"title": "扩展 eliza : 构建你的第一个 Plugin", | ||
"description": "本文介绍了如何构建一个 eliza 插件,包括插件的结构、Action、Service、Provider 等模块的定义和使用方法。还详细说明了如何在 runtime 中调用插件、插件之间的互相调用,以及 Provider 的调用方式。最后提供了一个 plugin-sui 的演示和相关的视频教程链接。", | ||
"description": "本文介绍了如何构建一个 eliza 插件,包括插件的结构、Action、Service、Provider 等模块的定义和使用方法,以及如何在 runtime 中调用和插件之间的互相调用。", | ||
"id": "first-plugin-action" | ||
}, | ||
{ | ||
"title": "Eliza 原理解析(上):Agent 工具调用", | ||
"description": "本文详细介绍了Eliza框架中Provider和Action的运行原理。Provider用于解决AI获取特定领域信息不准确的问题,通过封装代码获取数据并以自然语言形式返回给AI Model。Action则用于封装复杂的链上操作,帮助AI理解并执行任务。文章还探讨了如何让AI理解其调用的Action,并通过callback函数将执行结果加入AI的memory中。", | ||
"id": "eliza-baiscs-call-tools" | ||
"title": "Run Eliza With Tee", | ||
"description": "介绍TEE 的相关知识,以及如何使用TEE 运行Eliza 的 AI Agent.", | ||
"id": "tee-and-eliza" | ||
}, | ||
{ | ||
"title": "快速开始,构建一个 Telegram 的 Chatbot", | ||
"description": "本指南详细介绍了如何从零开始构建一个 Telegram 聊天机器人。内容包括环境安装、NodeJS 安装、代码下载、启动 eliza、配置 telegram bot、选择大模型服务、配置 character.json、启动 telegram bot 测试以及常见问题解决。此外,还提供了视频教程链接,帮助用户更直观地理解和操作。", | ||
"description": "本指南详细介绍了如何从零开始构建一个 Telegram 聊天机器人。内容包括环境安装、NodeJS 配置、代码下载与构建、Telegram Bot 的申请与配置、大模型服务的选择与配置、以及常见问题的解决方法。此外,还提供了视频教程链接,帮助开发者更直观地理解和操作。", | ||
"id": "first-telegram-bot" | ||
}, | ||
{ | ||
"title": "Run Eliza With Tee", | ||
"description": "介绍TEE 的相关知识,以及如何使用TEE 运行Eliza 的 AI Agent。作者 Twitter: https://x.com/zhou49。包含视频直播链接。", | ||
"id": "tee-and-eliza" | ||
"title": "Eliza 原理解析(上):Agent 工具调用", | ||
"description": "本文详细介绍了Eliza框架中Provider和Action的运行原理。Provider用于解决AI获取特定领域信息不准确的问题,而Action则封装了AI的执行代码,帮助AI理解并执行复杂任务。文章还探讨了AI如何通过Provider获取信息、如何调用Action以及如何让AI理解其调用的Action。", | ||
"id": "eliza-baiscs-call-tools" | ||
}, | ||
{ | ||
"title": "Eliza knowlege & memory", | ||
"description": "Eliza 中的存储结构包括 Character、AgentRuntime、MemoryManagers 等组件,通过数据库适配器进行数据存储。缓存管理器 ICacheManager 提供 get、set、delete 接口,支持 redis、database、filesystem 三种存储方式。数据库支持 sqlite 和 postgres,作为数据持久层。知识碎片通过 uuid 生成唯一 id,处理模块位于 src/core/knowlege.ts,写入分两步进行。memoryManagers 包含多个管理器,如 messageManager、knowledgeManager 等。memory 的基本单位包括 id、userId、agentId 等字段。使用举例包括 memory 的写入和读取,以及 knowledge 的获取和写入。", | ||
"id": "custom-agent-withmemory" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { generateText } from "ai"; | ||
import dotenv from "dotenv"; | ||
import { newOpenAI } from "./tools"; | ||
const main = async () => { | ||
dotenv.config(); | ||
const model = process.env.MODEL; | ||
if (!model) { | ||
throw new Error("MODEL is not set"); | ||
} | ||
|
||
const content = "你好"; | ||
|
||
const openai = newOpenAI(); | ||
|
||
const response = await generateText({ | ||
model: openai(model), | ||
system: "You are a friendly assistant!", | ||
prompt: content, | ||
}); | ||
|
||
console.log(response.text); | ||
}; | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.