diff --git a/.env.example b/.env.example index ecd965fc4c0..59fbb564402 100644 --- a/.env.example +++ b/.env.example @@ -29,6 +29,9 @@ X_SERVER_URL= XAI_API_KEY= XAI_MODEL= +#USE IMAGE GEN +IMAGE_GEN= #TRUE + #Leave blank to use local embeddings USE_OPENAI_EMBEDDING= #TRUE diff --git a/.gitignore b/.gitignore index 18eb1dea66e..592f8857cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,5 @@ characters/ packages/core/src/providers/cache packages/core/src/providers/cache/* -cache/* \ No newline at end of file +cache/* +packages/core/cache/* \ No newline at end of file diff --git a/README.md b/README.md index 3f10a0a36d7..e4db1ab6de5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ Eliza Banner ### [For Chinese Version: 中文说明](./README_CN.md) +### [For Japanese Version: 日本語の説明](./README_JA.md) +### [For Korean Version: 한국어 설명](./README_KOR.md) +### [For French Version: Instructions en français](./README_FR.md) ## Features @@ -26,7 +29,7 @@ **Prerequisites (MUST):** - [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23.1+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - [pnpm](https://pnpm.io/installation) ### Edit the .env file diff --git a/README_CN.md b/README_CN.md index 9147f78738f..6bb9de9c510 100644 --- a/README_CN.md +++ b/README_CN.md @@ -23,7 +23,7 @@ **前置要求(必须):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - Nodejs安装 - [pnpm](https://pnpm.io/installation) - 使用pnpm diff --git a/README_FR.md b/README_FR.md new file mode 100644 index 00000000000..a0e96bda4e8 --- /dev/null +++ b/README_FR.md @@ -0,0 +1,172 @@ +# Eliza + +Eliza Banner + +## la fonctionnalité + +- 🛠 soutenir la connexion discord/ twitter /telegram +- 👥 soutien aux agents multimodaux +- 📚 simple à importer des documents et interagir avec les documents +- mémoire et stockage des documents accessibles +- 🚀 haute scalabilité, vous pouvez personnaliser les clients et les comportements pour une extension fonctionnelle +- ☁ ️ plusieurs modèles, y compris Llama, OpenAI Grok Anthropic, etc. +- 📦 simple et facile à utiliser + +Que pouvez-vous faire avec Eliza? + +- 🤖 le chatbot +- 🕵 ️ Agents autonomes +- 📈 processus métier pour automatiser le traitement +- 🎮 jeux PNJ + +# commencez à utiliser + +**pré-requis (obligatoire) :** + +- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- installation Nodejs +- [pnpm](https://pnpm.io/installation) +- travailler avec PNPM + +### éditer le fichier.env + +- copiez.env.example en.env et remplissez la valeur appropriée +- modifier l’environnement twitter et entrer votre compte twitter et mot de passe + +### modifier les fichiers de rôles + +- voir le document ` src/core/defaultCharacter ts ` - vous pouvez le modifier +- vous pouvez également utiliser `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json" ` et simultanément plusieurs robots. + +Après avoir terminé la configuration des fichiers de compte et de rôle, lancez votre bot en tapant la ligne de commande suivante: + + +``` +pnpm i +pnpm start +``` + +# personnalisez votre Eliza + +### ajouter un comportement régulier + +Pour éviter les conflits Git dans le répertoire core, nous vous recommandons d’ajouter les actions personnalisées dans le répertoire custom_actions et de les configurer dans le fichier elizaconfig.yaml. Vous pouvez consulter l’exemple dans le fichier elizaconfig.example.yaml. + +## configurez différents grands modèles + +### configurer Llama + +Vous pouvez exécuter en définissant la variable d’environnement `XAI_MODEL` à `meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` ou `meta-llama/Meta-Llama-3.1-405B-Instruct` Llama 70B ou 405B modèle + +### configurer OpenAI + +Vous pouvez exécuter le modèle OpenAI en définissant la variable d’environnement `XAI_MODEL` à `gpt-4o-mini` ou `gpt-4o` + +## autres demandes + +Vous devrez peut-être installer Sharp. Si vous voyez une erreur au démarrage, essayez d’installer avec la commande suivante: + +``` +pnpm install --include=optional sharp +``` + +# paramètres de l’environnement + +Vous devez ajouter des variables d’environnement à votre fichier.env pour vous connecter à différentes plates-formes: + +``` +# Required environment variables +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Bot token +OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk- +ELEVENLABS_XI_API_KEY= # API key from elevenlabs + +# ELEVENLABS SETTINGS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Account username +TWITTER_PASSWORD= # Account password +TWITTER_EMAIL= # Account email +TWITTER_COOKIES= # Account cookies + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# For asking Claude stuff +ANTHROPIC_API_KEY= + +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# paramètres locaux + +### ensemble CUDA + +Si vous avez une carte graphique nvidia haute performance, vous pouvez faire l’accélération locale avec la ligne de commande suivante CUDA + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +Assurez-vous d’avoir le kit complet CUDA installé, y compris cuDNN et cuBLAS + +### exécution locale + +Ajoutez XAI_MODEL et définissez-le à l’une des options ci-dessus [use Llama run](#run-with-llama) +Vous pouvez laisser X_SERVER_URL et XAI_API_KEY vides, qui téléchargera le modèle de huggingface et le consultera localement + +# le client + +Pour savoir comment configurer votre bot discord, vous pouvez consulter la documentation officielle de discord + +# le développement + +## le test + +Ligne de commande pour plusieurs méthodes de test: + +```bash +pnpm test # Run tests once +pnpm test:watch # Run tests in watch mode +``` + +Pour les tests spécifiques à la base de données: + +```bash +pnpm test:sqlite # Run tests with SQLite +pnpm test:sqljs # Run tests with SQL.js +``` + +Les tests sont écrits en Jest et se trouvent dans le fichier SRC /\*_/_.test.ts. L’environnement de test est configuré comme suit: + +- chargement des variables d’environnement de.env.test +- utilisez un temps d’attente de 2 minutes pour exécuter des tests de longue durée +- support du module ESM +- exécuter les tests dans l’ordre (--runInBand) + +Pour créer un nouveau test, ajoutez un fichier.test.ts à côté du code à tester. \ No newline at end of file diff --git a/README_JA.md b/README_JA.md new file mode 100644 index 00000000000..2281db8a1bc --- /dev/null +++ b/README_JA.md @@ -0,0 +1,174 @@ +# Eliza + +Eliza Banner + +## 機能 + +- 🛠 Discord、Twitter、Telegramのフル機能コネクタ +- 👥 マルチエージェントおよびルームサポート +- 📚 ドキュメントの簡単な取り込みと対話 +- 💾 検索可能なメモリおよびドキュメントストア +- 🚀 高い拡張性 - 機能を拡張するための独自のアクションとクライアントを作成可能 +- ☁️ Llama、OpenAI、Anthropic、Groqなど、多くのモデルをサポート +- 📦 すぐに使える! + +## 何に使えるのか? + +- 🤖 チャットボット +- 🕵️ 自律エージェント +- 📈 ビジネスプロセスの処理 +- 🎮 ビデオゲームのNPC + +# 始め方 + +**必須条件:** + +- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) + +### .envファイルの編集 + +- .env.exampleを.envにコピーし、適切な値を入力 +- TWITTER環境変数を編集して、ボットのユーザー名とパスワードを追加 + +### キャラクターファイルの編集 + +- `src/core/defaultCharacter.ts`ファイルを確認 - これを変更可能 +- `pnpm start --characters="path/to/your/character.json"`を使用してキャラクターをロードし、複数のボットを同時に実行可能 + +.envファイルとキャラクターファイルを設定した後、以下のコマンドでボットを起動可能: + +``` +pnpm i +pnpm start +``` + +# Elizaのカスタマイズ + +### カスタムアクションの追加 + +コアディレクトリでのGitの競合を避けるために、カスタムアクションを`custom_actions`ディレクトリに追加し、それを`elizaConfig.yaml`ファイルに追加することをお勧めします。例については`elizaConfig.example.yaml`ファイルを参照してください。 + +## 異なるモデルでの実行 + +### Llamaでの実行 + +`XAI_MODEL`環境変数を`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`または`meta-llama/Meta-Llama-3.1-405B-Instruct`に設定することで、Llama 70Bまたは405Bモデルを実行可能 + +### Grokでの実行 + +`XAI_MODEL`環境変数を`grok-beta`に設定することで、Grokモデルを実行可能 + +### OpenAIでの実行 + +`XAI_MODEL`環境変数を`gpt-4o-mini`または`gpt-4o`に設定することで、OpenAIモデルを実行可能 + +## 追加の要件 + +Sharpをインストールする必要があるかもしれません。起動時にエラーが表示された場合は、以下のコマンドでインストールを試みてください: + +``` +pnpm install --include=optional sharp +``` + +# 環境設定 + +���まざまなプラットフォームに接続するために、.envファイルに環境変数を追加する必要があります: + +``` +# 必須環境変数 +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # ボットトークン +OPENAI_API_KEY=sk-* # OpenAI APIキー、sk-で始まる +ELEVENLABS_XI_API_KEY= # elevenlabsからのAPIキー + +# ELEVENLABS設定 +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # アカウントのユーザー名 +TWITTER_PASSWORD= # アカウントのパスワード +TWITTER_EMAIL= # アカウントのメール +TWITTER_COOKIES= # アカウントのクッキー + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# Claudeに質問するため +ANTHROPIC_API_KEY= + +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# ローカル推論設定 + +### CUDA設定 + +NVIDIA GPUを持っている場合、CUDAをインストールしてローカル推論を大幅に高速化可能 + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +CUDA Toolkit、cuDNN、cuBLASをインストールしていることを確認してください。 + +### ローカルでの実行 + +XAI_MODELを追加し、[Llamaでの実行](#run-with-llama)のオプションのいずれかに設定 - X_SERVER_URLとXAI_API_KEYを空白のままにしておくと、huggingfaceからモデルをダウンロードし、ローカルでクエリを実行します。 + +# クライアント + +## Discordボット + +Discordボットの設定に関するヘルプについては、こちらを参照してください: https://discordjs.guide/preparations/setting-up-a-bot-application.html + +# 開発 + +## テスト + +テストスイートを実行するには: + +```bash +pnpm test # テストを一度実行 +pnpm test:watch # ウォッチモードでテストを実行 +``` + +データベース固有のテストの場合: + +```bash +pnpm test:sqlite # SQLiteでテストを実行 +pnpm test:sqljs # SQL.jsでテストを実行 +``` + +テストはJestを使用して記述されており、`src/**/*.test.ts`ファイルにあります。テスト環境は次のように構成されています: + +- `.env.test`から環境変数をロード +- 長時間実行されるテストのために2分のタイムアウトを使用 +- ESMモジュールをサポート +- テストを順番に実行 (--runInBand) + +新しいテストを作成するには、テストするコードの隣に`.test.ts`ファイルを追加します。 diff --git a/README_KOR.md b/README_KOR.md new file mode 100644 index 00000000000..6cbc3063ba4 --- /dev/null +++ b/README_KOR.md @@ -0,0 +1,171 @@ +# Eliza + +eliza banner + +## 기능 + +- 🛠 지지 discord 트위터/telegram 연결 +- 👥 지지여 모드 agent +- 📚 간단 한 문서를 가져오기와 문서를 번갈아 +- 💾 검색 할 수 있는 메모리와 문서 저장 +- 🚀 확장 가능 성이 높은, 사용자 정의 클라이언트와 행위를 확장 기능 +- ☁ ️여 모형 지지 llama · openai grok anthropic 등 +- 📦 간단 하기도 좋습니다. + +eliza로 뭘 할 수 있나요? + +- 🤖 챗 봇 +- 🕵 ️ 자주 agents +- 📈 업무 처리 과정을 자동화 +- 🎮 게임 npc + +# 사용시작 + +**전제 요구(필수):** + +- [Node.js 22 +](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- Nodejs 설치 +- [pnpm](https://pnpm.io/installation) +- pnpm을사용한다 + +## 편집.env 파일 + +- .env.example을.env로 복사하고 적절한 값을 입력한다 +- 트위터 환경을 편집하고, 트위터 계정과 비밀번호를 입력한다 + +## 캐릭터 파일 편집 + +- 파일 `src/core/defaultcharacter.ts ` - 그것을 수정 할 수 있다 +- 사용하셔도됩니다 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 여러 로봇을 동시에 실행하여 캐릭터를 불러옵니다. + +아이디와 캐릭터 파일 설정이 완료되었다면, 다음 명령줄을 입력하여 로봇을 실행시키십시오: + +``` +pnpm i +pnpm start +``` + +# 사용자 정의 Eliza + +### 일반 행동을 추가한다 + +커널 디렉터리에서 git 충돌을 방지하기 위해 custom_actions 디렉터리에 사용자 정의 동작을 추가하고 elizaconfig.yaml 파일에서 동작을 설정할 것을 제안한다.elizaconfig.example.yaml 파일의 예제는 참조할 수 있다. + +다른 대형 모델들을 배치한다 + +### 프로필Llama + +`XAI_MODEL`환경 변수를`meta-llama/meta-llam-3.1-70b-instruct-turbo`또는`meta-llama/meta-llam-3.1-405b-instruct`로 설정하여 실행할 수 있다라마 70b 405b 모델 + +## openai 설정 + +`XAI_MODEL`환경 변수를`gpt-4o-mini`또는`gpt-4o`로 설정하여 OpenAI 모델을 실행할 수 있다 + +## 기타 요구 사항 + +Sharp를 설치해야 할 수도 있습니다.시작시 오류가 발견되면 다음 명령으로 설치하십시오: + +``` +pnpm install-include=optional sharp +``` + +# 환경 설정 + +다양한 플랫폼에 연결하기 위해서는.env 파일에서 환경 변수를 추가해야 합니다: + +``` +# Required environment variables +DISCORD_APPLICATION_ID= +DISCORD_API_TOKEN= # Bot token +OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk- +ELEVENLABS_XI_API_KEY= # API key from elevenlabs + +# ELEVENLABS SETTINGS +ELEVENLABS_MODEL_ID=eleven_multilingual_v2 +ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM +ELEVENLABS_VOICE_STABILITY=0.5 +ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9 +ELEVENLABS_VOICE_STYLE=0.66 +ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false +ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4 +ELEVENLABS_OUTPUT_FORMAT=pcm_16000 + +TWITTER_DRY_RUN=false +TWITTER_USERNAME= # Account username +TWITTER_PASSWORD= # Account password +TWITTER_EMAIL= # Account email +TWITTER_COOKIES= # Account cookies + +X_SERVER_URL= +XAI_API_KEY= +XAI_MODEL= + + +# For asking Claude stuff +ANTHROPIC_API_KEY= + +WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY +WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY + +BIRDEYE_API_KEY= + +SOL_ADDRESS=So11111111111111111111111111111111111111112 +SLIPPAGE=1 +RPC_URL=https://api.mainnet-beta.solana.com +HELIUS_API_KEY= + + +## Telegram +TELEGRAM_BOT_TOKEN= + +TOGETHER_API_KEY= +``` + +# 로컬 설정 + +### cuda 설정 + +고성능 엔비디아 그래픽을 가지고 있다면 다음 명령줄에서 cuda를 사용하여 로컬 가속을 할 수 있다 + +``` +pnpm install +npx --no node-llama-cpp source download --gpu cuda +``` + +cuDNN과 cuBLAS를 포함한 완전한 cuda 키트를 설치했는지 확인하세요 + +### 로컬 실행 + +위의 [Llama로 실행](#run-with-llama) 옵션 중 하나로 XAI_MODEL을 추가한다 +X_SERVER_URL과 xai_api_key를 공백으로 두면 huggingface에서 모델을 다운로드하고 현지에서 쿼리한다 + +# 클라이언트 + +discord bot을 설정하는 방법에 대해 discord의 공식 문서를 볼 수 있습니까 + +# 개발 + +## 테스트 + +여러 테스트 방법을 위한 명령줄: + +```bash +pnpm test # Run tests once +pnpm test:watch # Run tests in watch mode +``` + +데이터베이스에 특화된 테스트: + +```bash +pnpm test:sqlite # Run tests with SQLite +pnpm test:sqljs # Run tests with SQL.js +``` + +테스트는 src/\*_/_.test.ts 파일에 있는 Jest로 작성된다.테스트 환경 설정은 다음과 같습니다: + +- .env.test에서 환경 변수를 불러온다 +- 장기 실행 테스트를 실행하기 위해 2분 제한 시간을 사용합니다 +- esm 모듈을 지원한다 +- 테스트 실행 순서 (--runInBand) + +새 테스트를 만들려면, 테스트할 코드 옆에.test.ts 파일을 추가하세요. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 435272f5ebe..ffdf6295fea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,7 +19,7 @@ _As seen powering [@DegenSpartanAI](https://x.com/degenspartanai) and [@MarcAInd **Prerequisites (MUST):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - [pnpm](https://pnpm.io/installation) ### Edit the .env file diff --git a/docs/README_CN.md b/docs/README_CN.md index 5a4bfe5c0d3..c3a7e624cca 100644 --- a/docs/README_CN.md +++ b/docs/README_CN.md @@ -23,7 +23,7 @@ **前置要求(必须):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - Nodejs安装 - [pnpm](https://pnpm.io/installation) - 使用pnpm diff --git a/docs/docs/api/_media/README_CN.md b/docs/docs/api/_media/README_CN.md index 5a4bfe5c0d3..9147f78738f 100644 --- a/docs/docs/api/_media/README_CN.md +++ b/docs/docs/api/_media/README_CN.md @@ -4,39 +4,39 @@ ## 功能 -- 🛠 支持discord/推特/telegram连接 -- 👥 支持多模态agent -- 📚 简单的导入文档并与文档交互 -- 💾 可检索的内存和文档存储 -- 🚀 高可拓展性,你可以自定义客户端和行为来进行功能拓展 -- ☁️ 多模型支持,包括Llama、OpenAI、Grok、Anthropic等 -- 📦 简单好用 +- 🛠 支持discord/推特/telegram连接 +- 👥 支持多模态agent +- 📚 简单的导入文档并与文档交互 +- 💾 可检索的内存和文档存储 +- 🚀 高可拓展性,你可以自定义客户端和行为来进行功能拓展 +- ☁️ 多模型支持,包括Llama、OpenAI、Grok、Anthropic等 +- 📦 简单好用 你可以用Eliza做什么? -- 🤖 聊天机器人 -- 🕵️ 自主Agents -- 📈 业务流程自动化处理 -- 🎮 游戏NPC +- 🤖 聊天机器人 +- 🕵️ 自主Agents +- 📈 业务流程自动化处理 +- 🎮 游戏NPC # 开始使用 **前置要求(必须):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- Nodejs安装 -- [pnpm](https://pnpm.io/installation) -- 使用pnpm +- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- Nodejs安装 +- [pnpm](https://pnpm.io/installation) +- 使用pnpm ### 编辑.env文件 -- - 将 .env.example 复制为 .env 并填写适当的值 -- 编辑推特环境并输入你的推特账号和密码 +- - 将 .env.example 复制为 .env 并填写适当的值 +- 编辑推特环境并输入你的推特账号和密码 ### 编辑角色文件 -- 查看文件 `src/core/defaultCharacter.ts` - 您可以修改它 -- 您也可以使用 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 加载角色并同时运行多个机器人。 +- 查看文件 `src/core/defaultCharacter.ts` - 您可以修改它 +- 您也可以使用 `node --loader ts-node/esm src/index.ts --characters="path/to/your/character.json"` 加载角色并同时运行多个机器人。 在完成账号和角色文件的配置后,输入以下命令行启动你的bot: @@ -163,9 +163,9 @@ pnpm test:sqljs # Run tests with SQL.js 测试使用 Jest 编写,位于 src/\*_/_.test.ts 文件中。测试环境配置如下: -- 从 .env.test 加载环境变量 -- 使用 2 分钟的超时时间来运行长时间运行的测试 -- 支持 ESM 模块 -- 按顺序运行测试 (--runInBand) +- 从 .env.test 加载环境变量 +- 使用 2 分钟的超时时间来运行长时间运行的测试 +- 支持 ESM 模块 +- 按顺序运行测试 (--runInBand) 要创建新测试,请在要测试的代码旁边添加一个 .test.ts 文件。 diff --git a/docs/docs/api/classes/AgentRuntime.md b/docs/docs/api/classes/AgentRuntime.md index 5a7cb26cbff..a86436f3c1e 100644 --- a/docs/docs/api/classes/AgentRuntime.md +++ b/docs/docs/api/classes/AgentRuntime.md @@ -47,9 +47,11 @@ Optional custom evaluators. Custom fetch function to use for making requests. -• **opts.imageGenModel?**: [`ImageGenModel`](../enumerations/ImageGenModel.md) +• **opts.managers?**: [`IMemoryManager`](../interfaces/IMemoryManager.md)[] -• **opts.modelProvider**: [`ModelProvider`](../enumerations/ModelProvider.md) +• **opts.modelProvider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) + +• **opts.plugins?**: [`Plugin`](../type-aliases/Plugin.md)[] • **opts.providers?**: [`Provider`](../interfaces/Provider.md)[] @@ -59,6 +61,10 @@ Optional context providers. The URL of the worker. +• **opts.services?**: [`Service`](Service.md)[] + +Optional custom services. + • **opts.speechModelPath?**: `string` • **opts.token**: `string` @@ -71,7 +77,7 @@ The JWT token, can be a JWT token if outside worker, or an OpenAI token if insid #### Defined in -[core/src/core/runtime.ts:188](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L188) +[packages/core/src/runtime.ts:192](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L192) ## Properties @@ -87,9 +93,9 @@ Custom actions that the agent can perform. #### Defined in -[core/src/core/runtime.ts:91](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L91) +[packages/core/src/runtime.ts:78](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L78) ---- +*** ### agentId @@ -103,23 +109,9 @@ The ID of the agent #### Defined in -[core/src/core/runtime.ts:72](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L72) - ---- - -### browserService - -> **browserService**: [`IBrowserService`](../interfaces/IBrowserService.md) - -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`browserService`](../interfaces/IAgentRuntime.md#browserservice) - -#### Defined in - -[core/src/core/runtime.ts:125](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L125) +[packages/core/src/runtime.ts:59](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L59) ---- +*** ### character @@ -133,9 +125,9 @@ The character to use for the agent #### Defined in -[core/src/core/runtime.ts:140](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L140) +[packages/core/src/runtime.ts:104](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L104) ---- +*** ### databaseAdapter @@ -149,9 +141,9 @@ The database adapter used for interacting with the database. #### Defined in -[core/src/core/runtime.ts:81](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L81) +[packages/core/src/runtime.ts:68](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L68) ---- +*** ### descriptionManager @@ -165,9 +157,9 @@ Store and recall descriptions of users based on conversations. #### Defined in -[core/src/core/runtime.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L150) +[packages/core/src/runtime.ts:114](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L114) ---- +*** ### documentsManager @@ -177,9 +169,9 @@ Hold large documents that can be referenced #### Defined in -[core/src/core/runtime.ts:165](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L165) +[packages/core/src/runtime.ts:124](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L124) ---- +*** ### evaluators @@ -187,27 +179,15 @@ Hold large documents that can be referenced Evaluators used to assess and guide the agent's responses. -#### Defined in - -[core/src/core/runtime.ts:96](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L96) - ---- - -### factManager - -> **factManager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) - -Manage the fact and recall of facts. - #### Implementation of -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`factManager`](../interfaces/IAgentRuntime.md#factmanager) +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`evaluators`](../interfaces/IAgentRuntime.md#evaluators) #### Defined in -[core/src/core/runtime.ts:155](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L155) +[packages/core/src/runtime.ts:83](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L83) ---- +*** ### fetch() @@ -240,83 +220,47 @@ Some environments may not have access to the global fetch function and need a cu #### Defined in -[core/src/core/runtime.ts:135](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L135) +[packages/core/src/runtime.ts:99](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L99) ---- +*** -### fragmentsManager +### knowledgeManager -> **fragmentsManager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) +> **knowledgeManager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) Searchable document fragments #### Defined in -[core/src/core/runtime.ts:170](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L170) - ---- - -### imageDescriptionService - -> **imageDescriptionService**: [`IImageRecognitionService`](../interfaces/IImageRecognitionService.md) - -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`imageDescriptionService`](../interfaces/IAgentRuntime.md#imagedescriptionservice) - -#### Defined in - -[core/src/core/runtime.ts:123](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L123) - ---- - -### imageGenModel - -> **imageGenModel**: [`ImageGenModel`](../enumerations/ImageGenModel.md) = `ImageGenModel.TogetherAI` - -The model to use for image generation. +[packages/core/src/runtime.ts:129](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L129) -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`imageGenModel`](../interfaces/IAgentRuntime.md#imagegenmodel) - -#### Defined in +*** -[core/src/core/runtime.ts:111](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L111) - ---- - -### llamaService +### loreManager -> **llamaService**: `LlamaService` = `null` +> **loreManager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) -Local Llama if no OpenAI key is present +Manage the creation and recall of static information (documents, historical game lore, etc) #### Implementation of -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`llamaService`](../interfaces/IAgentRuntime.md#llamaservice) +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`loreManager`](../interfaces/IAgentRuntime.md#loremanager) #### Defined in -[core/src/core/runtime.ts:116](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L116) - ---- - -### loreManager - -> **loreManager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) +[packages/core/src/runtime.ts:119](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L119) -Manage the creation and recall of static information (documents, historical game lore, etc) +*** -#### Implementation of +### memoryManagers -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`loreManager`](../interfaces/IAgentRuntime.md#loremanager) +> **memoryManagers**: `Map`\<`string`, [`IMemoryManager`](../interfaces/IMemoryManager.md)\> #### Defined in -[core/src/core/runtime.ts:160](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L160) +[packages/core/src/runtime.ts:132](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L132) ---- +*** ### messageManager @@ -330,13 +274,13 @@ Store messages that are sent and received by the agent. #### Defined in -[core/src/core/runtime.ts:145](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L145) +[packages/core/src/runtime.ts:109](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L109) ---- +*** ### modelProvider -> **modelProvider**: [`ModelProvider`](../enumerations/ModelProvider.md) = `ModelProvider.LLAMALOCAL` +> **modelProvider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) The model to use for generateText. @@ -346,23 +290,9 @@ The model to use for generateText. #### Defined in -[core/src/core/runtime.ts:106](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L106) +[packages/core/src/runtime.ts:93](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L93) ---- - -### pdfService - -> **pdfService**: [`IPdfService`](../interfaces/IPdfService.md) - -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`pdfService`](../interfaces/IAgentRuntime.md#pdfservice) - -#### Defined in - -[core/src/core/runtime.ts:129](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L129) - ---- +*** ### providers @@ -376,9 +306,9 @@ Context providers used to provide context for message generation. #### Defined in -[core/src/core/runtime.ts:101](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L101) +[packages/core/src/runtime.ts:88](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L88) ---- +*** ### serverUrl @@ -392,23 +322,23 @@ The base URL of the server where the agent's requests are processed. #### Defined in -[core/src/core/runtime.ts:76](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L76) +[packages/core/src/runtime.ts:63](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L63) ---- +*** -### speechService +### services -> **speechService**: [`ISpeechService`](../interfaces/ISpeechService.md) +> **services**: `Map`\<[`ServiceType`](../enumerations/ServiceType.md), [`Service`](Service.md)\> #### Implementation of -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`speechService`](../interfaces/IAgentRuntime.md#speechservice) +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`services`](../interfaces/IAgentRuntime.md#services) #### Defined in -[core/src/core/runtime.ts:119](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L119) +[packages/core/src/runtime.ts:131](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L131) ---- +*** ### token @@ -422,35 +352,7 @@ Authentication token used for securing requests. #### Defined in -[core/src/core/runtime.ts:86](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L86) - ---- - -### transcriptionService - -> **transcriptionService**: [`ITranscriptionService`](../interfaces/ITranscriptionService.md) - -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`transcriptionService`](../interfaces/IAgentRuntime.md#transcriptionservice) - -#### Defined in - -[core/src/core/runtime.ts:121](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L121) - ---- - -### videoService - -> **videoService**: [`IVideoService`](../interfaces/IVideoService.md) - -#### Implementation of - -[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`videoService`](../interfaces/IAgentRuntime.md#videoservice) - -#### Defined in - -[core/src/core/runtime.ts:127](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L127) +[packages/core/src/runtime.ts:73](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L73) ## Methods @@ -480,9 +382,9 @@ The state of the agent. #### Defined in -[core/src/core/runtime.ts:673](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L673) +[packages/core/src/runtime.ts:667](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L667) ---- +*** ### ensureConnection() @@ -510,9 +412,9 @@ The state of the agent. #### Defined in -[core/src/core/runtime.ts:624](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L624) +[packages/core/src/runtime.ts:618](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L618) ---- +*** ### ensureParticipantExists() @@ -542,9 +444,9 @@ An error if the participant cannot be added. #### Defined in -[core/src/core/runtime.ts:577](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L577) +[packages/core/src/runtime.ts:571](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L571) ---- +*** ### ensureParticipantInRoom() @@ -566,9 +468,9 @@ An error if the participant cannot be added. #### Defined in -[core/src/core/runtime.ts:613](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L613) +[packages/core/src/runtime.ts:607](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L607) ---- +*** ### ensureRoomExists() @@ -597,9 +499,9 @@ An error if the room cannot be created. #### Defined in -[core/src/core/runtime.ts:660](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L660) +[packages/core/src/runtime.ts:654](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L654) ---- +*** ### ensureUserExists() @@ -633,13 +535,13 @@ The user name to ensure the existence of. #### Defined in -[core/src/core/runtime.ts:593](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L593) +[packages/core/src/runtime.ts:587](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L587) ---- +*** ### evaluate() -> **evaluate**(`message`, `state`?): `Promise`\<`string`[]\> +> **evaluate**(`message`, `state`?, `didRespond`?): `Promise`\<`string`[]\> Evaluate the message and state using the registered evaluators. @@ -653,6 +555,10 @@ The message to evaluate. The state of the agent. +• **didRespond?**: `boolean` + +Whether the agent responded to the message. + #### Returns `Promise`\<`string`[]\> @@ -665,9 +571,9 @@ The results of the evaluation. #### Defined in -[core/src/core/runtime.ts:511](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L511) +[packages/core/src/runtime.ts:501](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L501) ---- +*** ### getConversationLength() @@ -687,9 +593,53 @@ The number of recent messages to be kept in memory. #### Defined in -[core/src/core/runtime.ts:410](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L410) +[packages/core/src/runtime.ts:394](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L394) + +*** + +### getMemoryManager() + +> **getMemoryManager**(`tableName`): [`IMemoryManager`](../interfaces/IMemoryManager.md) + +#### Parameters + +• **tableName**: `string` + +#### Returns + +[`IMemoryManager`](../interfaces/IMemoryManager.md) + +#### Implementation of + +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`getMemoryManager`](../interfaces/IAgentRuntime.md#getmemorymanager) + +#### Defined in + +[packages/core/src/runtime.ts:149](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L149) + +*** + +### getService() + +> **getService**(`service`): *typeof* [`Service`](Service.md) + +#### Parameters + +• **service**: [`ServiceType`](../enumerations/ServiceType.md) + +#### Returns + +*typeof* [`Service`](Service.md) + +#### Implementation of + +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`getService`](../interfaces/IAgentRuntime.md#getservice) + +#### Defined in + +[packages/core/src/runtime.ts:153](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L153) ---- +*** ### getSetting() @@ -709,9 +659,9 @@ The number of recent messages to be kept in memory. #### Defined in -[core/src/core/runtime.ts:388](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L388) +[packages/core/src/runtime.ts:372](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L372) ---- +*** ### processActions() @@ -741,9 +691,9 @@ The message to process. #### Defined in -[core/src/core/runtime.ts:444](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L444) +[packages/core/src/runtime.ts:428](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L428) ---- +*** ### registerAction() @@ -767,9 +717,9 @@ The action to register. #### Defined in -[core/src/core/runtime.ts:418](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L418) +[packages/core/src/runtime.ts:402](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L402) ---- +*** ### registerContextProvider() @@ -789,9 +739,9 @@ The context provider to register. #### Defined in -[core/src/core/runtime.ts:435](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L435) +[packages/core/src/runtime.ts:419](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L419) ---- +*** ### registerEvaluator() @@ -811,9 +761,53 @@ The evaluator to register. #### Defined in -[core/src/core/runtime.ts:427](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L427) +[packages/core/src/runtime.ts:411](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L411) + +*** + +### registerMemoryManager() + +> **registerMemoryManager**(`manager`): `void` + +#### Parameters + +• **manager**: [`IMemoryManager`](../interfaces/IMemoryManager.md) + +#### Returns + +`void` + +#### Implementation of + +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`registerMemoryManager`](../interfaces/IAgentRuntime.md#registermemorymanager) + +#### Defined in + +[packages/core/src/runtime.ts:134](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L134) + +*** + +### registerService() + +> **registerService**(`service`): `void` + +#### Parameters + +• **service**: [`Service`](Service.md) + +#### Returns + +`void` + +#### Implementation of + +[`IAgentRuntime`](../interfaces/IAgentRuntime.md).[`registerService`](../interfaces/IAgentRuntime.md#registerservice) + +#### Defined in + +[packages/core/src/runtime.ts:161](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L161) ---- +*** ### updateRecentMessageState() @@ -833,4 +827,4 @@ The evaluator to register. #### Defined in -[core/src/core/runtime.ts:1146](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/runtime.ts#L1146) +[packages/core/src/runtime.ts:1124](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/runtime.ts#L1124) diff --git a/docs/docs/api/classes/DatabaseAdapter.md b/docs/docs/api/classes/DatabaseAdapter.md index a25bd0a1328..3eeb547466e 100644 --- a/docs/docs/api/classes/DatabaseAdapter.md +++ b/docs/docs/api/classes/DatabaseAdapter.md @@ -3,11 +3,6 @@ An abstract class representing a database adapter for managing various entities like accounts, memories, actors, goals, and rooms. -## Extended by - -- [`PostgresDatabaseAdapter`](PostgresDatabaseAdapter.md) -- [`SqliteDatabaseAdapter`](SqliteDatabaseAdapter.md) - ## Implements - [`IDatabaseAdapter`](../interfaces/IDatabaseAdapter.md) @@ -36,7 +31,7 @@ The database instance. #### Defined in -[core/src/core/database.ts:21](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L21) +[packages/core/src/database.ts:21](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L21) ## Methods @@ -68,9 +63,9 @@ A Promise that resolves to a boolean indicating success or failure. #### Defined in -[core/src/core/database.ts:266](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L266) +[packages/core/src/database.ts:266](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L266) ---- +*** ### countMemories() @@ -104,9 +99,9 @@ A Promise that resolves to the number of memories. #### Defined in -[core/src/core/database.ts:179](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L179) +[packages/core/src/database.ts:179](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L179) ---- +*** ### createAccount() @@ -132,9 +127,9 @@ A Promise that resolves when the account creation is complete. #### Defined in -[core/src/core/database.ts:34](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L34) +[packages/core/src/database.ts:34](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L34) ---- +*** ### createGoal() @@ -160,9 +155,9 @@ A Promise that resolves when the goal has been created. #### Defined in -[core/src/core/database.ts:209](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L209) +[packages/core/src/database.ts:209](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L209) ---- +*** ### createMemory() @@ -196,9 +191,9 @@ A Promise that resolves when the memory has been created. #### Defined in -[core/src/core/database.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L150) +[packages/core/src/database.ts:150](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L150) ---- +*** ### createRelationship() @@ -228,9 +223,9 @@ A Promise that resolves to a boolean indicating success or failure of the creati #### Defined in -[core/src/core/database.ts:312](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L312) +[packages/core/src/database.ts:312](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L312) ---- +*** ### createRoom() @@ -256,9 +251,9 @@ A Promise that resolves to the UUID of the created room. #### Defined in -[core/src/core/database.ts:237](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L237) +[packages/core/src/database.ts:237](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L237) ---- +*** ### getAccountById() @@ -284,9 +279,9 @@ A Promise that resolves to the Account object or null if not found. #### Defined in -[core/src/core/database.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L27) +[packages/core/src/database.ts:27](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L27) ---- +*** ### getActorDetails() @@ -314,9 +309,9 @@ A Promise that resolves to an array of Actor objects. #### Defined in -[core/src/core/database.ts:99](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L99) +[packages/core/src/database.ts:99](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L99) ---- +*** ### getCachedEmbeddings() @@ -330,17 +325,17 @@ Retrieves cached embeddings based on the specified query parameters. An object containing parameters for the embedding retrieval. -• **params.query_field_name**: `string` +• **params.query\_field\_name**: `string` -• **params.query_field_sub_name**: `string` +• **params.query\_field\_sub\_name**: `string` -• **params.query_input**: `string` +• **params.query\_input**: `string` -• **params.query_match_count**: `number` +• **params.query\_match\_count**: `number` -• **params.query_table_name**: `string` +• **params.query\_table\_name**: `string` -• **params.query_threshold**: `number` +• **params.query\_threshold**: `number` #### Returns @@ -354,9 +349,9 @@ A Promise that resolves to an array of objects containing embeddings and levensh #### Defined in -[core/src/core/database.ts:61](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L61) +[packages/core/src/database.ts:61](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L61) ---- +*** ### getGoals() @@ -390,9 +385,9 @@ A Promise that resolves to an array of Goal objects. #### Defined in -[core/src/core/database.ts:190](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L190) +[packages/core/src/database.ts:190](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L190) ---- +*** ### getMemories() @@ -426,9 +421,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:41](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L41) +[packages/core/src/database.ts:41](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L41) ---- +*** ### getMemoriesByRoomIds() @@ -454,9 +449,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:48](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L48) +[packages/core/src/database.ts:48](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L48) ---- +*** ### getMemoryById() @@ -476,9 +471,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:54](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L54) +[packages/core/src/database.ts:54](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L54) ---- +*** ### getParticipantsForAccount() @@ -506,7 +501,7 @@ A Promise that resolves to an array of Participant objects. ##### Defined in -[core/src/core/database.ts:281](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L281) +[packages/core/src/database.ts:281](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L281) #### getParticipantsForAccount(userId) @@ -532,9 +527,9 @@ A Promise that resolves to an array of Participant objects. ##### Defined in -[core/src/core/database.ts:288](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L288) +[packages/core/src/database.ts:288](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L288) ---- +*** ### getParticipantsForRoom() @@ -560,9 +555,9 @@ A Promise that resolves to an array of UUIDs representing the participants. #### Defined in -[core/src/core/database.ts:295](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L295) +[packages/core/src/database.ts:295](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L295) ---- +*** ### getParticipantUserState() @@ -584,9 +579,9 @@ A Promise that resolves to an array of UUIDs representing the participants. #### Defined in -[core/src/core/database.ts:297](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L297) +[packages/core/src/database.ts:297](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L297) ---- +*** ### getRelationship() @@ -616,9 +611,9 @@ A Promise that resolves to the Relationship object or null if not found. #### Defined in -[core/src/core/database.ts:322](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L322) +[packages/core/src/database.ts:322](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L322) ---- +*** ### getRelationships() @@ -646,9 +641,9 @@ A Promise that resolves to an array of Relationship objects. #### Defined in -[core/src/core/database.ts:332](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L332) +[packages/core/src/database.ts:332](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L332) ---- +*** ### getRoom() @@ -674,9 +669,9 @@ A Promise that resolves to the room ID or null if not found. #### Defined in -[core/src/core/database.ts:230](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L230) +[packages/core/src/database.ts:230](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L230) ---- +*** ### getRoomsForParticipant() @@ -702,9 +697,9 @@ A Promise that resolves to an array of room IDs. #### Defined in -[core/src/core/database.ts:251](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L251) +[packages/core/src/database.ts:251](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L251) ---- +*** ### getRoomsForParticipants() @@ -730,9 +725,9 @@ A Promise that resolves to an array of room IDs. #### Defined in -[core/src/core/database.ts:258](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L258) +[packages/core/src/database.ts:258](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L258) ---- +*** ### log() @@ -766,9 +761,9 @@ A Promise that resolves when the log entry has been saved. #### Defined in -[core/src/core/database.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L87) +[packages/core/src/database.ts:87](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L87) ---- +*** ### removeAllGoals() @@ -794,9 +789,9 @@ A Promise that resolves when all goals have been removed. #### Defined in -[core/src/core/database.ts:223](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L223) +[packages/core/src/database.ts:223](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L223) ---- +*** ### removeAllMemories() @@ -826,9 +821,9 @@ A Promise that resolves when all memories have been removed. #### Defined in -[core/src/core/database.ts:170](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L170) +[packages/core/src/database.ts:170](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L170) ---- +*** ### removeGoal() @@ -854,9 +849,9 @@ A Promise that resolves when the goal has been removed. #### Defined in -[core/src/core/database.ts:216](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L216) +[packages/core/src/database.ts:216](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L216) ---- +*** ### removeMemory() @@ -886,9 +881,9 @@ A Promise that resolves when the memory has been removed. #### Defined in -[core/src/core/database.ts:162](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L162) +[packages/core/src/database.ts:162](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L162) ---- +*** ### removeParticipant() @@ -918,9 +913,9 @@ A Promise that resolves to a boolean indicating success or failure. #### Defined in -[core/src/core/database.ts:274](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L274) +[packages/core/src/database.ts:274](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L274) ---- +*** ### removeRoom() @@ -946,9 +941,9 @@ A Promise that resolves when the room has been removed. #### Defined in -[core/src/core/database.ts:244](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L244) +[packages/core/src/database.ts:244](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L244) ---- +*** ### searchMemories() @@ -964,9 +959,9 @@ An object containing parameters for the memory search. • **params.embedding**: `number`[] -• **params.match_count**: `number` +• **params.match\_count**: `number` -• **params.match_threshold**: `number` +• **params.match\_threshold**: `number` • **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` @@ -986,9 +981,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:106](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L106) +[packages/core/src/database.ts:106](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L106) ---- +*** ### searchMemoriesByEmbedding() @@ -1010,7 +1005,7 @@ Additional parameters for the search. • **params.count?**: `number` -• **params.match_threshold?**: `number` +• **params.match\_threshold?**: `number` • **params.roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` @@ -1030,9 +1025,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:131](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L131) +[packages/core/src/database.ts:131](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L131) ---- +*** ### setParticipantUserState() @@ -1056,9 +1051,9 @@ A Promise that resolves to an array of Memory objects. #### Defined in -[core/src/core/database.ts:301](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L301) +[packages/core/src/database.ts:301](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L301) ---- +*** ### updateGoal() @@ -1084,9 +1079,9 @@ A Promise that resolves when the goal has been updated. #### Defined in -[core/src/core/database.ts:202](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L202) +[packages/core/src/database.ts:202](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L202) ---- +*** ### updateGoalStatus() @@ -1116,4 +1111,4 @@ A Promise that resolves when the goal status has been updated. #### Defined in -[core/src/core/database.ts:120](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L120) +[packages/core/src/database.ts:120](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/database.ts#L120) diff --git a/docs/docs/api/classes/DirectClient.md b/docs/docs/api/classes/DirectClient.md deleted file mode 100644 index 5b0662da0c9..00000000000 --- a/docs/docs/api/classes/DirectClient.md +++ /dev/null @@ -1,69 +0,0 @@ -# Class: DirectClient - -## Constructors - -### new DirectClient() - -> **new DirectClient**(): [`DirectClient`](DirectClient.md) - -#### Returns - -[`DirectClient`](DirectClient.md) - -#### Defined in - -[core/src/clients/direct/index.ts:57](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/direct/index.ts#L57) - -## Methods - -### registerAgent() - -> **registerAgent**(`runtime`): `void` - -#### Parameters - -• **runtime**: [`AgentRuntime`](AgentRuntime.md) - -#### Returns - -`void` - -#### Defined in - -[core/src/clients/direct/index.ts:263](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/direct/index.ts#L263) - ---- - -### start() - -> **start**(`port`): `void` - -#### Parameters - -• **port**: `number` - -#### Returns - -`void` - -#### Defined in - -[core/src/clients/direct/index.ts:271](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/direct/index.ts#L271) - ---- - -### unregisterAgent() - -> **unregisterAgent**(`runtime`): `void` - -#### Parameters - -• **runtime**: [`AgentRuntime`](AgentRuntime.md) - -#### Returns - -`void` - -#### Defined in - -[core/src/clients/direct/index.ts:267](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/direct/index.ts#L267) diff --git a/docs/docs/api/classes/DiscordClient.md b/docs/docs/api/classes/DiscordClient.md deleted file mode 100644 index 66dd101ca5c..00000000000 --- a/docs/docs/api/classes/DiscordClient.md +++ /dev/null @@ -1,1502 +0,0 @@ -# Class: DiscordClient - -## Extends - -- `EventEmitter` - -## Constructors - -### new DiscordClient() - -> **new DiscordClient**(`runtime`): [`DiscordClient`](DiscordClient.md) - -#### Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Returns - -[`DiscordClient`](DiscordClient.md) - -#### Overrides - -`EventEmitter.constructor` - -#### Defined in - -[core/src/clients/discord/index.ts:34](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/discord/index.ts#L34) - -## Properties - -### apiToken - -> **apiToken**: `string` - -#### Defined in - -[core/src/clients/discord/index.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/discord/index.ts#L27) - ---- - -### character - -> **character**: [`Character`](../type-aliases/Character.md) - -#### Defined in - -[core/src/clients/discord/index.ts:30](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/discord/index.ts#L30) - ---- - -### captureRejections - -> `static` **captureRejections**: `boolean` - -Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - -Change the default `captureRejections` option on all new `EventEmitter` objects. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`EventEmitter.captureRejections` - -#### Defined in - -node_modules/@types/node/events.d.ts:459 - ---- - -### captureRejectionSymbol - -> `readonly` `static` **captureRejectionSymbol**: _typeof_ [`captureRejectionSymbol`](TwitterPostClient.md#capturerejectionsymbol) - -Value: `Symbol.for('nodejs.rejection')` - -See how to write a custom `rejection handler`. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`EventEmitter.captureRejectionSymbol` - -#### Defined in - -node_modules/@types/node/events.d.ts:452 - ---- - -### defaultMaxListeners - -> `static` **defaultMaxListeners**: `number` - -By default, a maximum of `10` listeners can be registered for any single -event. This limit can be changed for individual `EventEmitter` instances -using the `emitter.setMaxListeners(n)` method. To change the default -for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property -can be used. If this value is not a positive number, a `RangeError` is thrown. - -Take caution when setting the `events.defaultMaxListeners` because the -change affects _all_ `EventEmitter` instances, including those created before -the change is made. However, calling `emitter.setMaxListeners(n)` still has -precedence over `events.defaultMaxListeners`. - -This is not a hard limit. The `EventEmitter` instance will allow -more listeners to be added but will output a trace warning to stderr indicating -that a "possible EventEmitter memory leak" has been detected. For any single -`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to -temporarily avoid this warning: - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.setMaxListeners(emitter.getMaxListeners() + 1); -emitter.once("event", () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); -}); -``` - -The `--trace-warnings` command-line flag can be used to display the -stack trace for such warnings. - -The emitted warning can be inspected with `process.on('warning')` and will -have the additional `emitter`, `type`, and `count` properties, referring to -the event emitter instance, the event's name and the number of attached -listeners, respectively. -Its `name` property is set to `'MaxListenersExceededWarning'`. - -#### Since - -v0.11.2 - -#### Inherited from - -`EventEmitter.defaultMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:498 - ---- - -### errorMonitor - -> `readonly` `static` **errorMonitor**: _typeof_ [`errorMonitor`](TwitterPostClient.md#errormonitor) - -This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no -regular `'error'` listener is installed. - -#### Since - -v13.6.0, v12.17.0 - -#### Inherited from - -`EventEmitter.errorMonitor` - -#### Defined in - -node_modules/@types/node/events.d.ts:445 - -## Methods - -### \[captureRejectionSymbol\]()? - -> `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` - -#### Type Parameters - -• **K** - -#### Parameters - -• **error**: `Error` - -• **event**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`void` - -#### Inherited from - -`EventEmitter.[captureRejectionSymbol]` - -#### Defined in - -node_modules/@types/node/events.d.ts:136 - ---- - -### addListener() - -> **addListener**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.on(eventName, listener)`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`EventEmitter.addListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:597 - ---- - -### emit() - -> **emit**\<`K`\>(`eventName`, ...`args`): `boolean` - -Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments -to each. - -Returns `true` if the event had listeners, `false` otherwise. - -```js -import { EventEmitter } from "node:events"; -const myEmitter = new EventEmitter(); - -// First listener -myEmitter.on("event", function firstListener() { - console.log("Helloooo! first listener"); -}); -// Second listener -myEmitter.on("event", function secondListener(arg1, arg2) { - console.log(`event with parameters ${arg1}, ${arg2} in second listener`); -}); -// Third listener -myEmitter.on("event", function thirdListener(...args) { - const parameters = args.join(", "); - console.log(`event with parameters ${parameters} in third listener`); -}); - -console.log(myEmitter.listeners("event")); - -myEmitter.emit("event", 1, 2, 3, 4, 5); - -// Prints: -// [ -// [Function: firstListener], -// [Function: secondListener], -// [Function: thirdListener] -// ] -// Helloooo! first listener -// event with parameters 1, 2 in second listener -// event with parameters 1, 2, 3, 4, 5 in third listener -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`boolean` - -#### Since - -v0.1.26 - -#### Inherited from - -`EventEmitter.emit` - -#### Defined in - -node_modules/@types/node/events.d.ts:859 - ---- - -### eventNames() - -> **eventNames**(): (`string` \| `symbol`)[] - -Returns an array listing the events for which the emitter has registered -listeners. The values in the array are strings or `Symbol`s. - -```js -import { EventEmitter } from "node:events"; - -const myEE = new EventEmitter(); -myEE.on("foo", () => {}); -myEE.on("bar", () => {}); - -const sym = Symbol("symbol"); -myEE.on(sym, () => {}); - -console.log(myEE.eventNames()); -// Prints: [ 'foo', 'bar', Symbol(symbol) ] -``` - -#### Returns - -(`string` \| `symbol`)[] - -#### Since - -v6.0.0 - -#### Inherited from - -`EventEmitter.eventNames` - -#### Defined in - -node_modules/@types/node/events.d.ts:922 - ---- - -### getMaxListeners() - -> **getMaxListeners**(): `number` - -Returns the current max listener value for the `EventEmitter` which is either -set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](DiscordClient.md#defaultmaxlisteners). - -#### Returns - -`number` - -#### Since - -v1.0.0 - -#### Inherited from - -`EventEmitter.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:774 - ---- - -### handleReactionAdd() - -> **handleReactionAdd**(`reaction`, `user`): `Promise`\<`void`\> - -#### Parameters - -• **reaction**: `MessageReaction` - -• **user**: `User` - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/clients/discord/index.ts:121](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/discord/index.ts#L121) - ---- - -### handleReactionRemove() - -> **handleReactionRemove**(`reaction`, `user`): `Promise`\<`void`\> - -#### Parameters - -• **reaction**: `MessageReaction` - -• **user**: `User` - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/clients/discord/index.ts:195](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/discord/index.ts#L195) - ---- - -### listenerCount() - -> **listenerCount**\<`K`\>(`eventName`, `listener`?): `number` - -Returns the number of listeners listening for the event named `eventName`. -If `listener` is provided, it will return how many times the listener is found -in the list of the listeners of the event. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event being listened for - -• **listener?**: `Function` - -The event handler function - -#### Returns - -`number` - -#### Since - -v3.2.0 - -#### Inherited from - -`EventEmitter.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:868 - ---- - -### listeners() - -> **listeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -console.log(util.inspect(server.listeners("connection"))); -// Prints: [ [Function] ] -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v0.1.26 - -#### Inherited from - -`EventEmitter.listeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:787 - ---- - -### off() - -> **off**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.removeListener()`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v10.0.0 - -#### Inherited from - -`EventEmitter.off` - -#### Defined in - -node_modules/@types/node/events.d.ts:747 - ---- - -### on() - -> **on**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the end of the listeners array for the event -named `eventName`. No checks are made to see if the `listener` has already -been added. Multiple calls passing the same combination of `eventName` and -`listener` will result in the `listener` being added, and called, multiple times. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.on("foo", () => console.log("a")); -myEE.prependListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.1.101 - -#### Inherited from - -`EventEmitter.on` - -#### Defined in - -node_modules/@types/node/events.d.ts:629 - ---- - -### once() - -> **once**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time** `listener` function for the event named `eventName`. The -next time `eventName` is triggered, this listener is removed and then invoked. - -```js -server.once("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.once("foo", () => console.log("a")); -myEE.prependOnceListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.3.0 - -#### Inherited from - -`EventEmitter.once` - -#### Defined in - -node_modules/@types/node/events.d.ts:659 - ---- - -### prependListener() - -> **prependListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the _beginning_ of the listeners array for the -event named `eventName`. No checks are made to see if the `listener` has -already been added. Multiple calls passing the same combination of `eventName` -and `listener` will result in the `listener` being added, and called, multiple times. - -```js -server.prependListener("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`EventEmitter.prependListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:886 - ---- - -### prependOnceListener() - -> **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this -listener is removed, and then invoked. - -```js -server.prependOnceListener("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`EventEmitter.prependOnceListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:902 - ---- - -### rawListeners() - -> **rawListeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`, -including any wrappers (such as those created by `.once()`). - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.once("log", () => console.log("log once")); - -// Returns a new Array with a function `onceWrapper` which has a property -// `listener` which contains the original listener bound above -const listeners = emitter.rawListeners("log"); -const logFnWrapper = listeners[0]; - -// Logs "log once" to the console and does not unbind the `once` event -logFnWrapper.listener(); - -// Logs "log once" to the console and removes the listener -logFnWrapper(); - -emitter.on("log", () => console.log("log persistently")); -// Will return a new Array with a single function bound by `.on()` above -const newListeners = emitter.rawListeners("log"); - -// Logs "log persistently" twice -newListeners[0](); -emitter.emit("log"); -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v9.4.0 - -#### Inherited from - -`EventEmitter.rawListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:818 - ---- - -### removeAllListeners() - -> **removeAllListeners**(`eventName`?): `this` - -Removes all listeners, or those of the specified `eventName`. - -It is bad practice to remove listeners added elsewhere in the code, -particularly when the `EventEmitter` instance was created by some other -component or module (e.g. sockets or file streams). - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **eventName?**: `string` \| `symbol` - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`EventEmitter.removeAllListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:758 - ---- - -### removeListener() - -> **removeListener**\<`K`\>(`eventName`, `listener`): `this` - -Removes the specified `listener` from the listener array for the event named `eventName`. - -```js -const callback = (stream) => { - console.log("someone connected!"); -}; -server.on("connection", callback); -// ... -server.removeListener("connection", callback); -``` - -`removeListener()` will remove, at most, one instance of a listener from the -listener array. If any single listener has been added multiple times to the -listener array for the specified `eventName`, then `removeListener()` must be -called multiple times to remove each instance. - -Once an event is emitted, all listeners attached to it at the -time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution -will not remove them from`emit()` in progress. Subsequent events behave as expected. - -```js -import { EventEmitter } from "node:events"; -class MyEmitter extends EventEmitter {} -const myEmitter = new MyEmitter(); - -const callbackA = () => { - console.log("A"); - myEmitter.removeListener("event", callbackB); -}; - -const callbackB = () => { - console.log("B"); -}; - -myEmitter.on("event", callbackA); - -myEmitter.on("event", callbackB); - -// callbackA removes listener callbackB but it will still be called. -// Internal listener array at time of emit [callbackA, callbackB] -myEmitter.emit("event"); -// Prints: -// A -// B - -// callbackB is now removed. -// Internal listener array [callbackA] -myEmitter.emit("event"); -// Prints: -// A -``` - -Because listeners are managed using an internal array, calling this will -change the position indices of any listener registered _after_ the listener -being removed. This will not impact the order in which listeners are called, -but it means that any copies of the listener array as returned by -the `emitter.listeners()` method will need to be recreated. - -When a single function has been added as a handler multiple times for a single -event (as in the example below), `removeListener()` will remove the most -recently added instance. In the example the `once('ping')` listener is removed: - -```js -import { EventEmitter } from "node:events"; -const ee = new EventEmitter(); - -function pong() { - console.log("pong"); -} - -ee.on("ping", pong); -ee.once("ping", pong); -ee.removeListener("ping", pong); - -ee.emit("ping"); -ee.emit("ping"); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`EventEmitter.removeListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:742 - ---- - -### setMaxListeners() - -> **setMaxListeners**(`n`): `this` - -By default `EventEmitter`s will print a warning if more than `10` listeners are -added for a particular event. This is a useful default that helps finding -memory leaks. The `emitter.setMaxListeners()` method allows the limit to be -modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **n**: `number` - -#### Returns - -`this` - -#### Since - -v0.3.5 - -#### Inherited from - -`EventEmitter.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:768 - ---- - -### addAbortListener() - -> `static` **addAbortListener**(`signal`, `resource`): `Disposable` - -**`Experimental`** - -Listens once to the `abort` event on the provided `signal`. - -Listening to the `abort` event on abort signals is unsafe and may -lead to resource leaks since another third party with the signal can -call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change -this since it would violate the web standard. Additionally, the original -API makes it easy to forget to remove listeners. - -This API allows safely using `AbortSignal`s in Node.js APIs by solving these -two issues by listening to the event such that `stopImmediatePropagation` does -not prevent the listener from running. - -Returns a disposable so that it may be unsubscribed from more easily. - -```js -import { addAbortListener } from "node:events"; - -function example(signal) { - let disposable; - try { - signal.addEventListener("abort", (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } -} -``` - -#### Parameters - -• **signal**: `AbortSignal` - -• **resource** - -#### Returns - -`Disposable` - -Disposable that removes the `abort` listener. - -#### Since - -v20.5.0 - -#### Inherited from - -`EventEmitter.addAbortListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:437 - ---- - -### getEventListeners() - -> `static` **getEventListeners**(`emitter`, `name`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -For `EventEmitter`s this behaves exactly the same as calling `.listeners` on -the emitter. - -For `EventTarget`s this is the only way to get the event listeners for the -event target. This is useful for debugging and diagnostic purposes. - -```js -import { getEventListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - const listener = () => console.log("Events are fun"); - ee.on("foo", listener); - console.log(getEventListeners(ee, "foo")); // [ [Function: listener] ] -} -{ - const et = new EventTarget(); - const listener = () => console.log("Events are fun"); - et.addEventListener("foo", listener); - console.log(getEventListeners(et, "foo")); // [ [Function: listener] ] -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -• **name**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v15.2.0, v14.17.0 - -#### Inherited from - -`EventEmitter.getEventListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:358 - ---- - -### getMaxListeners() - -> `static` **getMaxListeners**(`emitter`): `number` - -Returns the currently set max amount of listeners. - -For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on -the emitter. - -For `EventTarget`s this is the only way to get the max event listeners for the -event target. If the number of event handlers on a single EventTarget exceeds -the max set, the EventTarget will print a warning. - -```js -import { getMaxListeners, setMaxListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - console.log(getMaxListeners(ee)); // 10 - setMaxListeners(11, ee); - console.log(getMaxListeners(ee)); // 11 -} -{ - const et = new EventTarget(); - console.log(getMaxListeners(et)); // 10 - setMaxListeners(11, et); - console.log(getMaxListeners(et)); // 11 -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -#### Returns - -`number` - -#### Since - -v19.9.0 - -#### Inherited from - -`EventEmitter.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:387 - ---- - -### ~~listenerCount()~~ - -> `static` **listenerCount**(`emitter`, `eventName`): `number` - -A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - -```js -import { EventEmitter, listenerCount } from "node:events"; - -const myEmitter = new EventEmitter(); -myEmitter.on("event", () => {}); -myEmitter.on("event", () => {}); -console.log(listenerCount(myEmitter, "event")); -// Prints: 2 -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -The emitter to query - -• **eventName**: `string` \| `symbol` - -The event name - -#### Returns - -`number` - -#### Since - -v0.9.12 - -#### Deprecated - -Since v3.2.0 - Use `listenerCount` instead. - -#### Inherited from - -`EventEmitter.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:330 - ---- - -### on() - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); -}); - -for await (const event of on(ee, "foo")) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] -} -// Unreachable here -``` - -Returns an `AsyncIterator` that iterates `eventName` events. It will throw -if the `EventEmitter` emits `'error'`. It removes all listeners when -exiting the loop. The `value` returned by each iteration is an array -composed of the emitted event arguments. - -An `AbortSignal` can be used to cancel waiting on events: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ac = new AbortController(); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - }); - - for await (const event of on(ee, "foo", { signal: ac.signal })) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); - -process.nextTick(() => ac.abort()); -``` - -Use the `close` option to specify an array of event names that will end the iteration: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - ee.emit("close"); -}); - -for await (const event of on(ee, "foo", { close: ["close"] })) { - console.log(event); // prints ['bar'] [42] -} -// the loop will exit after 'close' is emitted -console.log("done"); // prints 'done' -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - -##### Since - -v13.6.0, v12.16.0 - -##### Inherited from - -`EventEmitter.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:303 - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -##### Inherited from - -`EventEmitter.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:308 - ---- - -### once() - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given -event or that is rejected if the `EventEmitter` emits `'error'` while waiting. -The `Promise` will resolve with an array of all the arguments emitted to the -given event. - -This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event -semantics and does not listen to the `'error'` event. - -```js -import { once, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -process.nextTick(() => { - ee.emit("myevent", 42); -}); - -const [value] = await once(ee, "myevent"); -console.log(value); - -const err = new Error("kaboom"); -process.nextTick(() => { - ee.emit("error", err); -}); - -try { - await once(ee, "myevent"); -} catch (err) { - console.error("error happened", err); -} -``` - -The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the -'`error'` event itself, then it is treated as any other kind of event without -special handling: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); - -once(ee, "error") - .then(([err]) => console.log("ok", err.message)) - .catch((err) => console.error("error", err.message)); - -ee.emit("error", new Error("boom")); - -// Prints: ok boom -``` - -An `AbortSignal` can be used to cancel waiting for the event: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); -const ac = new AbortController(); - -async function foo(emitter, event, signal) { - try { - await once(emitter, event, { signal }); - console.log("event emitted!"); - } catch (error) { - if (error.name === "AbortError") { - console.error("Waiting for the event was canceled!"); - } else { - console.error("There was an error", error.message); - } - } -} - -foo(ee, "foo", ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit("foo"); // Prints: Waiting for the event was canceled! -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Since - -v11.13.0, v10.16.0 - -##### Inherited from - -`EventEmitter.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:217 - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Inherited from - -`EventEmitter.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:222 - ---- - -### setMaxListeners() - -> `static` **setMaxListeners**(`n`?, ...`eventTargets`?): `void` - -```js -import { setMaxListeners, EventEmitter } from "node:events"; - -const target = new EventTarget(); -const emitter = new EventEmitter(); - -setMaxListeners(5, target, emitter); -``` - -#### Parameters - -• **n?**: `number` - -A non-negative number. The maximum number of listeners per `EventTarget` event. - -• ...**eventTargets?**: (`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] - -Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} -objects. - -#### Returns - -`void` - -#### Since - -v15.4.0 - -#### Inherited from - -`EventEmitter.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:402 diff --git a/docs/docs/api/classes/MemoryManager.md b/docs/docs/api/classes/MemoryManager.md index 4f605abac5c..ae2c0083148 100644 --- a/docs/docs/api/classes/MemoryManager.md +++ b/docs/docs/api/classes/MemoryManager.md @@ -34,7 +34,7 @@ The name of the table this manager will operate on. #### Defined in -[core/src/core/memory.ts:35](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L35) +[packages/core/src/memory.ts:35](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L35) ## Properties @@ -50,9 +50,9 @@ The AgentRuntime instance associated with this manager. #### Defined in -[core/src/core/memory.ts:22](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L22) +[packages/core/src/memory.ts:22](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L22) ---- +*** ### tableName @@ -66,7 +66,7 @@ The name of the database table this manager operates on. #### Defined in -[core/src/core/memory.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L27) +[packages/core/src/memory.ts:27](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L27) ## Methods @@ -94,9 +94,9 @@ A Promise resolving to the memory object, potentially updated with an embedding #### Defined in -[core/src/core/memory.ts:45](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L45) +[packages/core/src/memory.ts:45](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L45) ---- +*** ### countMemories() @@ -126,9 +126,9 @@ A Promise resolving to the count of memories. #### Defined in -[core/src/core/memory.ts:218](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L218) +[packages/core/src/memory.ts:219](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L219) ---- +*** ### createMemory() @@ -158,9 +158,9 @@ A Promise that resolves when the operation completes. #### Defined in -[core/src/core/memory.ts:158](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L158) +[packages/core/src/memory.ts:158](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L158) ---- +*** ### getCachedEmbeddings() @@ -180,9 +180,9 @@ A Promise that resolves when the operation completes. #### Defined in -[core/src/core/memory.ts:93](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L93) +[packages/core/src/memory.ts:93](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L93) ---- +*** ### getMemories() @@ -226,9 +226,9 @@ A Promise resolving to an array of Memory objects. #### Defined in -[core/src/core/memory.ts:66](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L66) +[packages/core/src/memory.ts:66](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L66) ---- +*** ### getMemoriesByRoomIds() @@ -252,9 +252,9 @@ A Promise resolving to an array of Memory objects. #### Defined in -[core/src/core/memory.ts:172](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L172) +[packages/core/src/memory.ts:173](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L173) ---- +*** ### getMemoryById() @@ -274,9 +274,9 @@ A Promise resolving to an array of Memory objects. #### Defined in -[core/src/core/memory.ts:183](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L183) +[packages/core/src/memory.ts:184](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L184) ---- +*** ### removeAllMemories() @@ -302,9 +302,9 @@ A Promise that resolves when the operation completes. #### Defined in -[core/src/core/memory.ts:205](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L205) +[packages/core/src/memory.ts:206](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L206) ---- +*** ### removeMemory() @@ -330,9 +330,9 @@ A Promise that resolves when the operation completes. #### Defined in -[core/src/core/memory.ts:193](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L193) +[packages/core/src/memory.ts:194](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L194) ---- +*** ### searchMemoriesByEmbedding() @@ -356,7 +356,7 @@ Options including match threshold, count, user IDs, and uniqueness. The maximum number of memories to retrieve. -• **opts.match_threshold?**: `number` +• **opts.match\_threshold?**: `number` The similarity threshold for matching memories. @@ -380,4 +380,4 @@ A Promise resolving to an array of Memory objects that match the embedding. #### Defined in -[core/src/core/memory.ts:120](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L120) +[packages/core/src/memory.ts:120](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L120) diff --git a/docs/docs/api/classes/PostgresDatabaseAdapter.md b/docs/docs/api/classes/PostgresDatabaseAdapter.md deleted file mode 100644 index 23da6fff343..00000000000 --- a/docs/docs/api/classes/PostgresDatabaseAdapter.md +++ /dev/null @@ -1,1132 +0,0 @@ -# Class: PostgresDatabaseAdapter - -An abstract class representing a database adapter for managing various entities -like accounts, memories, actors, goals, and rooms. - -## Extends - -- [`DatabaseAdapter`](DatabaseAdapter.md) - -## Constructors - -### new PostgresDatabaseAdapter() - -> **new PostgresDatabaseAdapter**(`connectionConfig`): [`PostgresDatabaseAdapter`](PostgresDatabaseAdapter.md) - -#### Parameters - -• **connectionConfig**: `any` - -#### Returns - -[`PostgresDatabaseAdapter`](PostgresDatabaseAdapter.md) - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`constructor`](DatabaseAdapter.md#constructors) - -#### Defined in - -[core/src/adapters/postgres.ts:19](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L19) - -## Properties - -### db - -> **db**: `any` - -The database instance. - -#### Inherited from - -[`DatabaseAdapter`](DatabaseAdapter.md).[`db`](DatabaseAdapter.md#db) - -#### Defined in - -[core/src/core/database.ts:21](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L21) - -## Methods - -### addParticipant() - -> **addParticipant**(`userId`, `roomId`): `Promise`\<`boolean`\> - -Adds a user as a participant to a specific room. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user to add as a participant. - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to which the user will be added. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`addParticipant`](DatabaseAdapter.md#addparticipant) - -#### Defined in - -[core/src/adapters/postgres.ts:681](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L681) - ---- - -### countMemories() - -> **countMemories**(`roomId`, `unique`, `tableName`): `Promise`\<`number`\> - -Counts the number of memories in a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room for which to count memories. - -• **unique**: `boolean` = `true` - -Specifies whether to count only unique memories. - -• **tableName**: `string` = `""` - -Optional table name to count memories from. - -#### Returns - -`Promise`\<`number`\> - -A Promise that resolves to the number of memories. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`countMemories`](DatabaseAdapter.md#countmemories) - -#### Defined in - -[core/src/adapters/postgres.ts:752](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L752) - ---- - -### createAccount() - -> **createAccount**(`account`): `Promise`\<`boolean`\> - -Creates a new account in the database. - -#### Parameters - -• **account**: [`Account`](../interfaces/Account.md) - -The account object to create. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves when the account creation is complete. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createAccount`](DatabaseAdapter.md#createaccount) - -#### Defined in - -[core/src/adapters/postgres.ts:186](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L186) - ---- - -### createGoal() - -> **createGoal**(`goal`): `Promise`\<`void`\> - -Creates a new goal in the database. - -#### Parameters - -• **goal**: [`Goal`](../interfaces/Goal.md) - -The goal object to create. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been created. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createGoal`](DatabaseAdapter.md#creategoal) - -#### Defined in - -[core/src/adapters/postgres.ts:454](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L454) - ---- - -### createMemory() - -> **createMemory**(`memory`, `tableName`): `Promise`\<`void`\> - -Creates a new memory in the database. - -#### Parameters - -• **memory**: [`Memory`](../interfaces/Memory.md) - -The memory object to create. - -• **tableName**: `string` - -The table where the memory should be stored. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the memory has been created. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createMemory`](DatabaseAdapter.md#creatememory) - -#### Defined in - -[core/src/adapters/postgres.ts:253](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L253) - ---- - -### createRelationship() - -> **createRelationship**(`params`): `Promise`\<`boolean`\> - -Creates a new relationship between two users. - -#### Parameters - -• **params** - -An object containing the UUIDs of the two users (userA and userB). - -• **params.userA**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userB**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure of the creation. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createRelationship`](DatabaseAdapter.md#createrelationship) - -#### Defined in - -[core/src/adapters/postgres.ts:505](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L505) - ---- - -### createRoom() - -> **createRoom**(`roomId`?): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -Creates a new room with an optional specified ID. - -#### Parameters - -• **roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -Optional UUID to assign to the new room. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -A Promise that resolves to the UUID of the created room. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createRoom`](DatabaseAdapter.md#createroom) - -#### Defined in - -[core/src/adapters/postgres.ts:483](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L483) - ---- - -### getAccountById() - -> **getAccountById**(`userId`): `Promise`\<[`Account`](../interfaces/Account.md)\> - -Retrieves an account by its ID. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user account to retrieve. - -#### Returns - -`Promise`\<[`Account`](../interfaces/Account.md)\> - -A Promise that resolves to the Account object or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getAccountById`](DatabaseAdapter.md#getaccountbyid) - -#### Defined in - -[core/src/adapters/postgres.ts:162](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L162) - ---- - -### getActorById() - -> **getActorById**(`params`): `Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -#### Parameters - -• **params** - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -#### Defined in - -[core/src/adapters/postgres.ts:210](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L210) - ---- - -### getActorDetails() - -> **getActorDetails**(`params`): `Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -Retrieves details of actors in a given room. - -#### Parameters - -• **params** - -An object containing the roomId to search for actors. - -• **params.roomId**: `string` - -#### Returns - -`Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -A Promise that resolves to an array of Actor objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getActorDetails`](DatabaseAdapter.md#getactordetails) - -#### Defined in - -[core/src/adapters/postgres.ts:810](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L810) - ---- - -### getCachedEmbeddings() - -> **getCachedEmbeddings**(`opts`): `Promise`\<`object`[]\> - -Retrieves cached embeddings based on the specified query parameters. - -#### Parameters - -• **opts** - -• **opts.query_field_name**: `string` - -• **opts.query_field_sub_name**: `string` - -• **opts.query_input**: `string` - -• **opts.query_match_count**: `number` - -• **opts.query_table_name**: `string` - -• **opts.query_threshold**: `number` - -#### Returns - -`Promise`\<`object`[]\> - -A Promise that resolves to an array of objects containing embeddings and levenshtein scores. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getCachedEmbeddings`](DatabaseAdapter.md#getcachedembeddings) - -#### Defined in - -[core/src/adapters/postgres.ts:559](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L559) - ---- - -### getGoals() - -> **getGoals**(`params`): `Promise`\<[`Goal`](../interfaces/Goal.md)[]\> - -Retrieves goals based on specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for goal retrieval. - -• **params.count?**: `number` - -• **params.onlyInProgress?**: `boolean` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Goal`](../interfaces/Goal.md)[]\> - -A Promise that resolves to an array of Goal objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getGoals`](DatabaseAdapter.md#getgoals) - -#### Defined in - -[core/src/adapters/postgres.ts:396](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L396) - ---- - -### getMemories() - -> **getMemories**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Retrieves memories based on the specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for the memory retrieval. - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.count?**: `number` - -• **params.end?**: `number` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.start?**: `number` - -• **params.tableName**: `string` - -• **params.unique?**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemories`](DatabaseAdapter.md#getmemories) - -#### Defined in - -[core/src/adapters/postgres.ts:334](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L334) - ---- - -### getMemoriesByRoomIds() - -> **getMemoriesByRoomIds**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -#### Parameters - -• **params** - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.roomIds**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[] - -• **params.tableName**: `string` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemoriesByRoomIds`](DatabaseAdapter.md#getmemoriesbyroomids) - -#### Defined in - -[core/src/adapters/postgres.ts:103](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L103) - ---- - -### getMemoryById() - -> **getMemoryById**(`id`): `Promise`\<[`Memory`](../interfaces/Memory.md)\> - -#### Parameters - -• **id**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemoryById`](DatabaseAdapter.md#getmemorybyid) - -#### Defined in - -[core/src/adapters/postgres.ts:232](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L232) - ---- - -### getParticipantsForAccount() - -> **getParticipantsForAccount**(`userId`): `Promise`\<[`Participant`](../interfaces/Participant.md)[]\> - -Retrieves participants associated with a specific account. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the account. - -#### Returns - -`Promise`\<[`Participant`](../interfaces/Participant.md)[]\> - -A Promise that resolves to an array of Participant objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantsForAccount`](DatabaseAdapter.md#getparticipantsforaccount) - -#### Defined in - -[core/src/adapters/postgres.ts:72](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L72) - ---- - -### getParticipantsForRoom() - -> **getParticipantsForRoom**(`roomId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves participants for a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room for which to retrieve participants. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of UUIDs representing the participants. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantsForRoom`](DatabaseAdapter.md#getparticipantsforroom) - -#### Defined in - -[core/src/adapters/postgres.ts:149](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L149) - ---- - -### getParticipantUserState() - -> **getParticipantUserState**(`roomId`, `userId`): `Promise`\<`"FOLLOWED"` \| `"MUTED"`\> - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`"FOLLOWED"` \| `"MUTED"`\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantUserState`](DatabaseAdapter.md#getparticipantuserstate) - -#### Defined in - -[core/src/adapters/postgres.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L87) - ---- - -### getRelationship() - -> **getRelationship**(`params`): `Promise`\<[`Relationship`](../interfaces/Relationship.md)\> - -Retrieves a relationship between two users if it exists. - -#### Parameters - -• **params** - -An object containing the UUIDs of the two users (userA and userB). - -• **params.userA**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userB**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Relationship`](../interfaces/Relationship.md)\> - -A Promise that resolves to the Relationship object or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRelationship`](DatabaseAdapter.md#getrelationship) - -#### Defined in - -[core/src/adapters/postgres.ts:529](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L529) - ---- - -### getRelationships() - -> **getRelationships**(`params`): `Promise`\<[`Relationship`](../interfaces/Relationship.md)[]\> - -Retrieves all relationships for a specific user. - -#### Parameters - -• **params** - -An object containing the UUID of the user. - -• **params.userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Relationship`](../interfaces/Relationship.md)[]\> - -A Promise that resolves to an array of Relationship objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRelationships`](DatabaseAdapter.md#getrelationships) - -#### Defined in - -[core/src/adapters/postgres.ts:546](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L546) - ---- - -### getRoom() - -> **getRoom**(`roomId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -Retrieves the room ID for a given room, if it exists. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to retrieve. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -A Promise that resolves to the room ID or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoom`](DatabaseAdapter.md#getroom) - -#### Defined in - -[core/src/adapters/postgres.ts:59](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L59) - ---- - -### getRoomsForParticipant() - -> **getRoomsForParticipant**(`userId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves room IDs for which a specific user is a participant. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of room IDs. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoomsForParticipant`](DatabaseAdapter.md#getroomsforparticipant) - -#### Defined in - -[core/src/adapters/postgres.ts:784](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L784) - ---- - -### getRoomsForParticipants() - -> **getRoomsForParticipants**(`userIds`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves room IDs for which specific users are participants. - -#### Parameters - -• **userIds**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[] - -An array of UUIDs of the users. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of room IDs. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoomsForParticipants`](DatabaseAdapter.md#getroomsforparticipants) - -#### Defined in - -[core/src/adapters/postgres.ts:797](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L797) - ---- - -### log() - -> **log**(`params`): `Promise`\<`void`\> - -Logs an event or action with the specified details. - -#### Parameters - -• **params** - -An object containing parameters for the log entry. - -• **params.body** - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.type**: `string` - -• **params.userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the log entry has been saved. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`log`](DatabaseAdapter.md#log) - -#### Defined in - -[core/src/adapters/postgres.ts:595](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L595) - ---- - -### removeAllGoals() - -> **removeAllGoals**(`roomId`): `Promise`\<`void`\> - -Removes all goals associated with a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room whose goals should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when all goals have been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeAllGoals`](DatabaseAdapter.md#removeallgoals) - -#### Defined in - -[core/src/adapters/postgres.ts:773](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L773) - ---- - -### removeAllMemories() - -> **removeAllMemories**(`roomId`, `tableName`): `Promise`\<`void`\> - -Removes all memories associated with a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room whose memories should be removed. - -• **tableName**: `string` - -The table from which the memories should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when all memories have been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeAllMemories`](DatabaseAdapter.md#removeallmemories) - -#### Defined in - -[core/src/adapters/postgres.ts:740](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L740) - ---- - -### removeGoal() - -> **removeGoal**(`goalId`): `Promise`\<`void`\> - -Removes a specific goal from the database. - -#### Parameters - -• **goalId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the goal to remove. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeGoal`](DatabaseAdapter.md#removegoal) - -#### Defined in - -[core/src/adapters/postgres.ts:474](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L474) - ---- - -### removeMemory() - -> **removeMemory**(`memoryId`, `tableName`): `Promise`\<`void`\> - -Removes a specific memory from the database. - -#### Parameters - -• **memoryId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the memory to remove. - -• **tableName**: `string` - -The table from which the memory should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the memory has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeMemory`](DatabaseAdapter.md#removememory) - -#### Defined in - -[core/src/adapters/postgres.ts:728](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L728) - ---- - -### removeParticipant() - -> **removeParticipant**(`userId`, `roomId`): `Promise`\<`boolean`\> - -Removes a user as a participant from a specific room. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user to remove as a participant. - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room from which the user will be removed. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeParticipant`](DatabaseAdapter.md#removeparticipant) - -#### Defined in - -[core/src/adapters/postgres.ts:697](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L697) - ---- - -### removeRoom() - -> **removeRoom**(`roomId`): `Promise`\<`void`\> - -Removes a specific room from the database. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to remove. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the room has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeRoom`](DatabaseAdapter.md#removeroom) - -#### Defined in - -[core/src/adapters/postgres.ts:496](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L496) - ---- - -### searchMemories() - -> **searchMemories**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Searches for memories based on embeddings and other specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for the memory search. - -• **params.embedding**: `number`[] - -• **params.match_count**: `number` - -• **params.match_threshold**: `number` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.tableName**: `string` - -• **params.unique**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`searchMemories`](DatabaseAdapter.md#searchmemories) - -#### Defined in - -[core/src/adapters/postgres.ts:291](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L291) - ---- - -### searchMemoriesByEmbedding() - -> **searchMemoriesByEmbedding**(`embedding`, `params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Searches for memories by embedding and other specified parameters. - -#### Parameters - -• **embedding**: `number`[] - -The embedding vector to search with. - -• **params** - -Additional parameters for the search. - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.count?**: `number` - -• **params.match_threshold?**: `number` - -• **params.roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.tableName**: `string` - -• **params.unique?**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`searchMemoriesByEmbedding`](DatabaseAdapter.md#searchmemoriesbyembedding) - -#### Defined in - -[core/src/adapters/postgres.ts:612](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L612) - ---- - -### setParticipantUserState() - -> **setParticipantUserState**(`roomId`, `userId`, `state`): `Promise`\<`void`\> - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **state**: `"FOLLOWED"` \| `"MUTED"` - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`setParticipantUserState`](DatabaseAdapter.md#setparticipantuserstate) - -#### Defined in - -[core/src/adapters/postgres.ts:133](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L133) - ---- - -### testConnection() - -> **testConnection**(): `Promise`\<`boolean`\> - -#### Returns - -`Promise`\<`boolean`\> - -#### Defined in - -[core/src/adapters/postgres.ts:37](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L37) - ---- - -### updateGoal() - -> **updateGoal**(`goal`): `Promise`\<`void`\> - -Updates a specific goal in the database. - -#### Parameters - -• **goal**: [`Goal`](../interfaces/Goal.md) - -The goal object with updated properties. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been updated. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`updateGoal`](DatabaseAdapter.md#updategoal) - -#### Defined in - -[core/src/adapters/postgres.ts:437](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L437) - ---- - -### updateGoalStatus() - -> **updateGoalStatus**(`params`): `Promise`\<`void`\> - -Updates the status of a specific goal. - -#### Parameters - -• **params** - -An object containing the goalId and the new status. - -• **params.goalId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.status**: [`GoalStatus`](../enumerations/GoalStatus.md) - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal status has been updated. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`updateGoalStatus`](DatabaseAdapter.md#updategoalstatus) - -#### Defined in - -[core/src/adapters/postgres.ts:713](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/postgres.ts#L713) diff --git a/docs/docs/api/classes/Service.md b/docs/docs/api/classes/Service.md new file mode 100644 index 00000000000..65b5088e8ad --- /dev/null +++ b/docs/docs/api/classes/Service.md @@ -0,0 +1,49 @@ +# Class: `abstract` Service + +## Extended by + +- [`IImageDescriptionService`](../interfaces/IImageDescriptionService.md) +- [`ITranscriptionService`](../interfaces/ITranscriptionService.md) +- [`IVideoService`](../interfaces/IVideoService.md) +- [`ITextGenerationService`](../interfaces/ITextGenerationService.md) +- [`IBrowserService`](../interfaces/IBrowserService.md) +- [`ISpeechService`](../interfaces/ISpeechService.md) +- [`IPdfService`](../interfaces/IPdfService.md) + +## Constructors + +### new Service() + +> **new Service**(): [`Service`](Service.md) + +#### Returns + +[`Service`](Service.md) + +## Properties + +### serviceType + +> `static` **serviceType**: [`ServiceType`](../enumerations/ServiceType.md) + +#### Defined in + +[packages/core/src/types.ts:507](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L507) + +## Methods + +### getInstance() + +> `static` **getInstance**\<`T`\>(): `T` + +#### Type Parameters + +• **T** *extends* [`Service`](Service.md) + +#### Returns + +`T` + +#### Defined in + +[packages/core/src/types.ts:509](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L509) diff --git a/docs/docs/api/classes/SqliteDatabaseAdapter.md b/docs/docs/api/classes/SqliteDatabaseAdapter.md deleted file mode 100644 index 0abba7df7fa..00000000000 --- a/docs/docs/api/classes/SqliteDatabaseAdapter.md +++ /dev/null @@ -1,1100 +0,0 @@ -# Class: SqliteDatabaseAdapter - -An abstract class representing a database adapter for managing various entities -like accounts, memories, actors, goals, and rooms. - -## Extends - -- [`DatabaseAdapter`](DatabaseAdapter.md) - -## Constructors - -### new SqliteDatabaseAdapter() - -> **new SqliteDatabaseAdapter**(`db`): [`SqliteDatabaseAdapter`](SqliteDatabaseAdapter.md) - -#### Parameters - -• **db**: `Database` - -#### Returns - -[`SqliteDatabaseAdapter`](SqliteDatabaseAdapter.md) - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`constructor`](DatabaseAdapter.md#constructors) - -#### Defined in - -[core/src/adapters/sqlite.ts:70](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L70) - -## Properties - -### db - -> **db**: `any` - -The database instance. - -#### Inherited from - -[`DatabaseAdapter`](DatabaseAdapter.md).[`db`](DatabaseAdapter.md#db) - -#### Defined in - -[core/src/core/database.ts:21](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/database.ts#L21) - -## Methods - -### addParticipant() - -> **addParticipant**(`userId`, `roomId`): `Promise`\<`boolean`\> - -Adds a user as a participant to a specific room. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user to add as a participant. - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to which the user will be added. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`addParticipant`](DatabaseAdapter.md#addparticipant) - -#### Defined in - -[core/src/adapters/sqlite.ts:592](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L592) - ---- - -### countMemories() - -> **countMemories**(`roomId`, `unique`, `tableName`): `Promise`\<`number`\> - -Counts the number of memories in a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room for which to count memories. - -• **unique**: `boolean` = `true` - -Specifies whether to count only unique memories. - -• **tableName**: `string` = `""` - -Optional table name to count memories from. - -#### Returns - -`Promise`\<`number`\> - -A Promise that resolves to the number of memories. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`countMemories`](DatabaseAdapter.md#countmemories) - -#### Defined in - -[core/src/adapters/sqlite.ts:465](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L465) - ---- - -### createAccount() - -> **createAccount**(`account`): `Promise`\<`boolean`\> - -Creates a new account in the database. - -#### Parameters - -• **account**: [`Account`](../interfaces/Account.md) - -The account object to create. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves when the account creation is complete. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createAccount`](DatabaseAdapter.md#createaccount) - -#### Defined in - -[core/src/adapters/sqlite.ts:102](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L102) - ---- - -### createGoal() - -> **createGoal**(`goal`): `Promise`\<`void`\> - -Creates a new goal in the database. - -#### Parameters - -• **goal**: [`Goal`](../interfaces/Goal.md) - -The goal object to create. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been created. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createGoal`](DatabaseAdapter.md#creategoal) - -#### Defined in - -[core/src/adapters/sqlite.ts:532](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L532) - ---- - -### createMemory() - -> **createMemory**(`memory`, `tableName`): `Promise`\<`void`\> - -Creates a new memory in the database. - -#### Parameters - -• **memory**: [`Memory`](../interfaces/Memory.md) - -The memory object to create. - -• **tableName**: `string` - -The table where the memory should be stored. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the memory has been created. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createMemory`](DatabaseAdapter.md#creatememory) - -#### Defined in - -[core/src/adapters/sqlite.ts:196](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L196) - ---- - -### createRelationship() - -> **createRelationship**(`params`): `Promise`\<`boolean`\> - -Creates a new relationship between two users. - -#### Parameters - -• **params** - -An object containing the UUIDs of the two users (userA and userB). - -• **params.userA**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userB**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure of the creation. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createRelationship`](DatabaseAdapter.md#createrelationship) - -#### Defined in - -[core/src/adapters/sqlite.ts:616](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L616) - ---- - -### createRoom() - -> **createRoom**(`roomId`?): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -Creates a new room with an optional specified ID. - -#### Parameters - -• **roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -Optional UUID to assign to the new room. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -A Promise that resolves to the UUID of the created room. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`createRoom`](DatabaseAdapter.md#createroom) - -#### Defined in - -[core/src/adapters/sqlite.ts:557](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L557) - ---- - -### getAccountById() - -> **getAccountById**(`userId`): `Promise`\<[`Account`](../interfaces/Account.md)\> - -Retrieves an account by its ID. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user account to retrieve. - -#### Returns - -`Promise`\<[`Account`](../interfaces/Account.md)\> - -A Promise that resolves to the Account object or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getAccountById`](DatabaseAdapter.md#getaccountbyid) - -#### Defined in - -[core/src/adapters/sqlite.ts:88](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L88) - ---- - -### getActorDetails() - -> **getActorDetails**(`params`): `Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -Retrieves details of actors in a given room. - -#### Parameters - -• **params** - -An object containing the roomId to search for actors. - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Actor`](../interfaces/Actor.md)[]\> - -A Promise that resolves to an array of Actor objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getActorDetails`](DatabaseAdapter.md#getactordetails) - -#### Defined in - -[core/src/adapters/sqlite.ts:123](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L123) - ---- - -### getCachedEmbeddings() - -> **getCachedEmbeddings**(`opts`): `Promise`\<`object`[]\> - -Retrieves cached embeddings based on the specified query parameters. - -#### Parameters - -• **opts** - -• **opts.query_field_name**: `string` - -• **opts.query_field_sub_name**: `string` - -• **opts.query_input**: `string` - -• **opts.query_match_count**: `number` - -• **opts.query_table_name**: `string` - -• **opts.query_threshold**: `number` - -#### Returns - -`Promise`\<`object`[]\> - -A Promise that resolves to an array of objects containing embeddings and levenshtein scores. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getCachedEmbeddings`](DatabaseAdapter.md#getcachedembeddings) - -#### Defined in - -[core/src/adapters/sqlite.ts:336](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L336) - ---- - -### getGoals() - -> **getGoals**(`params`): `Promise`\<[`Goal`](../interfaces/Goal.md)[]\> - -Retrieves goals based on specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for goal retrieval. - -• **params.count?**: `number` - -• **params.onlyInProgress?**: `boolean` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Goal`](../interfaces/Goal.md)[]\> - -A Promise that resolves to an array of Goal objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getGoals`](DatabaseAdapter.md#getgoals) - -#### Defined in - -[core/src/adapters/sqlite.ts:485](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L485) - ---- - -### getMemories() - -> **getMemories**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Retrieves memories based on the specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for the memory retrieval. - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.count?**: `number` - -• **params.end?**: `number` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.start?**: `number` - -• **params.tableName**: `string` - -• **params.unique?**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemories`](DatabaseAdapter.md#getmemories) - -#### Defined in - -[core/src/adapters/sqlite.ts:398](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L398) - ---- - -### getMemoriesByRoomIds() - -> **getMemoriesByRoomIds**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -#### Parameters - -• **params** - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.roomIds**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[] - -• **params.tableName**: `string` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemoriesByRoomIds`](DatabaseAdapter.md#getmemoriesbyroomids) - -#### Defined in - -[core/src/adapters/sqlite.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L150) - ---- - -### getMemoryById() - -> **getMemoryById**(`memoryId`): `Promise`\<[`Memory`](../interfaces/Memory.md)\> - -#### Parameters - -• **memoryId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getMemoryById`](DatabaseAdapter.md#getmemorybyid) - -#### Defined in - -[core/src/adapters/sqlite.ts:180](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L180) - ---- - -### getParticipantsForAccount() - -> **getParticipantsForAccount**(`userId`): `Promise`\<[`Participant`](../interfaces/Participant.md)[]\> - -Retrieves participants associated with a specific account. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the account. - -#### Returns - -`Promise`\<[`Participant`](../interfaces/Participant.md)[]\> - -A Promise that resolves to an array of Participant objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantsForAccount`](DatabaseAdapter.md#getparticipantsforaccount) - -#### Defined in - -[core/src/adapters/sqlite.ts:30](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L30) - ---- - -### getParticipantsForRoom() - -> **getParticipantsForRoom**(`roomId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves participants for a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room for which to retrieve participants. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of UUIDs representing the participants. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantsForRoom`](DatabaseAdapter.md#getparticipantsforroom) - -#### Defined in - -[core/src/adapters/sqlite.ts:40](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L40) - ---- - -### getParticipantUserState() - -> **getParticipantUserState**(`roomId`, `userId`): `Promise`\<`"FOLLOWED"` \| `"MUTED"`\> - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`"FOLLOWED"` \| `"MUTED"`\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getParticipantUserState`](DatabaseAdapter.md#getparticipantuserstate) - -#### Defined in - -[core/src/adapters/sqlite.ts:46](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L46) - ---- - -### getRelationship() - -> **getRelationship**(`params`): `Promise`\<[`Relationship`](../interfaces/Relationship.md)\> - -Retrieves a relationship between two users if it exists. - -#### Parameters - -• **params** - -An object containing the UUIDs of the two users (userA and userB). - -• **params.userA**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.userB**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Relationship`](../interfaces/Relationship.md)\> - -A Promise that resolves to the Relationship object or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRelationship`](DatabaseAdapter.md#getrelationship) - -#### Defined in - -[core/src/adapters/sqlite.ts:631](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L631) - ---- - -### getRelationships() - -> **getRelationships**(`params`): `Promise`\<[`Relationship`](../interfaces/Relationship.md)[]\> - -Retrieves all relationships for a specific user. - -#### Parameters - -• **params** - -An object containing the UUID of the user. - -• **params.userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<[`Relationship`](../interfaces/Relationship.md)[]\> - -A Promise that resolves to an array of Relationship objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRelationships`](DatabaseAdapter.md#getrelationships) - -#### Defined in - -[core/src/adapters/sqlite.ts:649](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L649) - ---- - -### getRoom() - -> **getRoom**(`roomId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -Retrieves the room ID for a given room, if it exists. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to retrieve. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`\> - -A Promise that resolves to the room ID or null if not found. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoom`](DatabaseAdapter.md#getroom) - -#### Defined in - -[core/src/adapters/sqlite.ts:22](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L22) - ---- - -### getRoomsForParticipant() - -> **getRoomsForParticipant**(`userId`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves room IDs for which a specific user is a participant. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of room IDs. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoomsForParticipant`](DatabaseAdapter.md#getroomsforparticipant) - -#### Defined in - -[core/src/adapters/sqlite.ts:573](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L573) - ---- - -### getRoomsForParticipants() - -> **getRoomsForParticipants**(`userIds`): `Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -Retrieves room IDs for which specific users are participants. - -#### Parameters - -• **userIds**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[] - -An array of UUIDs of the users. - -#### Returns - -`Promise`\<\`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`[]\> - -A Promise that resolves to an array of room IDs. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`getRoomsForParticipants`](DatabaseAdapter.md#getroomsforparticipants) - -#### Defined in - -[core/src/adapters/sqlite.ts:579](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L579) - ---- - -### log() - -> **log**(`params`): `Promise`\<`void`\> - -Logs an event or action with the specified details. - -#### Parameters - -• **params** - -An object containing parameters for the log entry. - -• **params.body** - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.type**: `string` - -• **params.userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the log entry has been saved. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`log`](DatabaseAdapter.md#log) - -#### Defined in - -[core/src/adapters/sqlite.ts:380](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L380) - ---- - -### removeAllGoals() - -> **removeAllGoals**(`roomId`): `Promise`\<`void`\> - -Removes all goals associated with a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room whose goals should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when all goals have been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeAllGoals`](DatabaseAdapter.md#removeallgoals) - -#### Defined in - -[core/src/adapters/sqlite.ts:552](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L552) - ---- - -### removeAllMemories() - -> **removeAllMemories**(`roomId`, `tableName`): `Promise`\<`void`\> - -Removes all memories associated with a specific room. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room whose memories should be removed. - -• **tableName**: `string` - -The table from which the memories should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when all memories have been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeAllMemories`](DatabaseAdapter.md#removeallmemories) - -#### Defined in - -[core/src/adapters/sqlite.ts:460](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L460) - ---- - -### removeGoal() - -> **removeGoal**(`goalId`): `Promise`\<`void`\> - -Removes a specific goal from the database. - -#### Parameters - -• **goalId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the goal to remove. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeGoal`](DatabaseAdapter.md#removegoal) - -#### Defined in - -[core/src/adapters/sqlite.ts:547](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L547) - ---- - -### removeMemory() - -> **removeMemory**(`memoryId`, `tableName`): `Promise`\<`void`\> - -Removes a specific memory from the database. - -#### Parameters - -• **memoryId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the memory to remove. - -• **tableName**: `string` - -The table from which the memory should be removed. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the memory has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeMemory`](DatabaseAdapter.md#removememory) - -#### Defined in - -[core/src/adapters/sqlite.ts:455](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L455) - ---- - -### removeParticipant() - -> **removeParticipant**(`userId`, `roomId`): `Promise`\<`boolean`\> - -Removes a user as a participant from a specific room. - -#### Parameters - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the user to remove as a participant. - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room from which the user will be removed. - -#### Returns - -`Promise`\<`boolean`\> - -A Promise that resolves to a boolean indicating success or failure. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeParticipant`](DatabaseAdapter.md#removeparticipant) - -#### Defined in - -[core/src/adapters/sqlite.ts:604](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L604) - ---- - -### removeRoom() - -> **removeRoom**(`roomId`): `Promise`\<`void`\> - -Removes a specific room from the database. - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -The UUID of the room to remove. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the room has been removed. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`removeRoom`](DatabaseAdapter.md#removeroom) - -#### Defined in - -[core/src/adapters/sqlite.ts:568](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L568) - ---- - -### searchMemories() - -> **searchMemories**(`params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Searches for memories based on embeddings and other specified parameters. - -#### Parameters - -• **params** - -An object containing parameters for the memory search. - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.embedding**: `number`[] - -• **params.match_count**: `number` - -• **params.match_threshold**: `number` - -• **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.tableName**: `string` - -• **params.unique**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`searchMemories`](DatabaseAdapter.md#searchmemories) - -#### Defined in - -[core/src/adapters/sqlite.ts:236](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L236) - ---- - -### searchMemoriesByEmbedding() - -> **searchMemoriesByEmbedding**(`embedding`, `params`): `Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -Searches for memories by embedding and other specified parameters. - -#### Parameters - -• **embedding**: `number`[] - -The embedding vector to search with. - -• **params** - -Additional parameters for the search. - -• **params.agentId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.count?**: `number` - -• **params.match_threshold?**: `number` - -• **params.roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.tableName**: `string` - -• **params.unique?**: `boolean` - -#### Returns - -`Promise`\<[`Memory`](../interfaces/Memory.md)[]\> - -A Promise that resolves to an array of Memory objects. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`searchMemoriesByEmbedding`](DatabaseAdapter.md#searchmemoriesbyembedding) - -#### Defined in - -[core/src/adapters/sqlite.ts:282](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L282) - ---- - -### setParticipantUserState() - -> **setParticipantUserState**(`roomId`, `userId`, `state`): `Promise`\<`void`\> - -#### Parameters - -• **roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **state**: `"FOLLOWED"` \| `"MUTED"` - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`setParticipantUserState`](DatabaseAdapter.md#setparticipantuserstate) - -#### Defined in - -[core/src/adapters/sqlite.ts:59](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L59) - ---- - -### updateGoal() - -> **updateGoal**(`goal`): `Promise`\<`void`\> - -Updates a specific goal in the database. - -#### Parameters - -• **goal**: [`Goal`](../interfaces/Goal.md) - -The goal object with updated properties. - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal has been updated. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`updateGoal`](DatabaseAdapter.md#updategoal) - -#### Defined in - -[core/src/adapters/sqlite.ts:519](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L519) - ---- - -### updateGoalStatus() - -> **updateGoalStatus**(`params`): `Promise`\<`void`\> - -Updates the status of a specific goal. - -#### Parameters - -• **params** - -An object containing the goalId and the new status. - -• **params.goalId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -• **params.status**: [`GoalStatus`](../enumerations/GoalStatus.md) - -#### Returns - -`Promise`\<`void`\> - -A Promise that resolves when the goal status has been updated. - -#### Overrides - -[`DatabaseAdapter`](DatabaseAdapter.md).[`updateGoalStatus`](DatabaseAdapter.md#updategoalstatus) - -#### Defined in - -[core/src/adapters/sqlite.ts:372](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/adapters/sqlite.ts#L372) diff --git a/docs/docs/api/classes/TelegramClient.md b/docs/docs/api/classes/TelegramClient.md deleted file mode 100644 index 6f29127555e..00000000000 --- a/docs/docs/api/classes/TelegramClient.md +++ /dev/null @@ -1,49 +0,0 @@ -# Class: TelegramClient - -## Constructors - -### new TelegramClient() - -> **new TelegramClient**(`runtime`, `botToken`): [`TelegramClient`](TelegramClient.md) - -#### Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -• **botToken**: `string` - -#### Returns - -[`TelegramClient`](TelegramClient.md) - -#### Defined in - -[core/src/clients/telegram/src/index.ts:12](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/telegram/src/index.ts#L12) - -## Methods - -### start() - -> **start**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/clients/telegram/src/index.ts:54](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/telegram/src/index.ts#L54) - ---- - -### stop() - -> **stop**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/clients/telegram/src/index.ts:91](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/telegram/src/index.ts#L91) diff --git a/docs/docs/api/classes/TokenProvider.md b/docs/docs/api/classes/TokenProvider.md deleted file mode 100644 index 0e0fb8d77eb..00000000000 --- a/docs/docs/api/classes/TokenProvider.md +++ /dev/null @@ -1,193 +0,0 @@ -# Class: TokenProvider - -## Constructors - -### new TokenProvider() - -> **new TokenProvider**(`tokenAddress`): [`TokenProvider`](TokenProvider.md) - -#### Parameters - -• **tokenAddress**: `string` - -#### Returns - -[`TokenProvider`](TokenProvider.md) - -#### Defined in - -[core/src/providers/token.ts:38](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L38) - -## Methods - -### analyzeHolderDistribution() - -> **analyzeHolderDistribution**(`tradeData`): `Promise`\<`string`\> - -#### Parameters - -• **tradeData**: `TokenTradeData` - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[core/src/providers/token.ts:461](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L461) - ---- - -### checkRecentTrades() - -> **checkRecentTrades**(`tradeData`): `Promise`\<`boolean`\> - -#### Parameters - -• **tradeData**: `TokenTradeData` - -#### Returns - -`Promise`\<`boolean`\> - -#### Defined in - -[core/src/providers/token.ts:631](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L631) - ---- - -### countHighSupplyHolders() - -> **countHighSupplyHolders**(`securityData`): `Promise`\<`number`\> - -#### Parameters - -• **securityData**: `TokenSecurityData` - -#### Returns - -`Promise`\<`number`\> - -#### Defined in - -[core/src/providers/token.ts:635](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L635) - ---- - -### fetchDexScreenerData() - -> **fetchDexScreenerData**(): `Promise`\<`DexScreenerData`\> - -#### Returns - -`Promise`\<`DexScreenerData`\> - -#### Defined in - -[core/src/providers/token.ts:420](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L420) - ---- - -### fetchHolderList() - -> **fetchHolderList**(): `Promise`\<`HolderData`[]\> - -#### Returns - -`Promise`\<`HolderData`[]\> - -#### Defined in - -[core/src/providers/token.ts:507](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L507) - ---- - -### fetchTokenSecurity() - -> **fetchTokenSecurity**(): `Promise`\<`TokenSecurityData`\> - -#### Returns - -`Promise`\<`TokenSecurityData`\> - -#### Defined in - -[core/src/providers/token.ts:155](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L155) - ---- - -### fetchTokenTradeData() - -> **fetchTokenTradeData**(): `Promise`\<`TokenTradeData`\> - -#### Returns - -`Promise`\<`TokenTradeData`\> - -#### Defined in - -[core/src/providers/token.ts:185](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L185) - ---- - -### filterHighValueHolders() - -> **filterHighValueHolders**(`tradeData`): `Promise`\<`object`[]\> - -#### Parameters - -• **tradeData**: `TokenTradeData` - -#### Returns - -`Promise`\<`object`[]\> - -#### Defined in - -[core/src/providers/token.ts:607](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L607) - ---- - -### formatTokenData() - -> **formatTokenData**(`data`): `string` - -#### Parameters - -• **data**: `ProcessedTokenData` - -#### Returns - -`string` - -#### Defined in - -[core/src/providers/token.ts:722](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L722) - ---- - -### getFormattedTokenReport() - -> **getFormattedTokenReport**(): `Promise`\<`string`\> - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[core/src/providers/token.ts:786](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L786) - ---- - -### getProcessedTokenData() - -> **getProcessedTokenData**(): `Promise`\<`ProcessedTokenData`\> - -#### Returns - -`Promise`\<`ProcessedTokenData`\> - -#### Defined in - -[core/src/providers/token.ts:656](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L656) diff --git a/docs/docs/api/classes/TwitterInteractionClient.md b/docs/docs/api/classes/TwitterInteractionClient.md deleted file mode 100644 index 7b06e7039e4..00000000000 --- a/docs/docs/api/classes/TwitterInteractionClient.md +++ /dev/null @@ -1,1798 +0,0 @@ -# Class: TwitterInteractionClient - -## Extends - -- `ClientBase` - -## Constructors - -### new TwitterInteractionClient() - -> **new TwitterInteractionClient**(`runtime`): [`TwitterInteractionClient`](TwitterInteractionClient.md) - -#### Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Returns - -[`TwitterInteractionClient`](TwitterInteractionClient.md) - -#### Overrides - -`ClientBase.constructor` - -#### Defined in - -[core/src/clients/twitter/interactions.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/interactions.ts#L87) - -## Properties - -### callback() - -> **callback**: (`self`) => `any` = `null` - -#### Parameters - -• **self**: `ClientBase` - -#### Returns - -`any` - -#### Inherited from - -`ClientBase.callback` - -#### Defined in - -[core/src/clients/twitter/base.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L150) - ---- - -### directions - -> **directions**: `string` - -#### Inherited from - -`ClientBase.directions` - -#### Defined in - -[core/src/clients/twitter/base.ts:89](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L89) - ---- - -### imageDescriptionService - -> **imageDescriptionService**: `ImageDescriptionService` - -#### Inherited from - -`ClientBase.imageDescriptionService` - -#### Defined in - -[core/src/clients/twitter/base.ts:92](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L92) - ---- - -### lastCheckedTweetId - -> **lastCheckedTweetId**: `number` = `null` - -#### Inherited from - -`ClientBase.lastCheckedTweetId` - -#### Defined in - -[core/src/clients/twitter/base.ts:90](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L90) - ---- - -### requestQueue - -> **requestQueue**: `RequestQueue` - -#### Inherited from - -`ClientBase.requestQueue` - -#### Defined in - -[core/src/clients/twitter/base.ts:96](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L96) - ---- - -### runtime - -> **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Inherited from - -`ClientBase.runtime` - -#### Defined in - -[core/src/clients/twitter/base.ts:88](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L88) - ---- - -### temperature - -> **temperature**: `number` = `0.5` - -#### Inherited from - -`ClientBase.temperature` - -#### Defined in - -[core/src/clients/twitter/base.ts:93](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L93) - ---- - -### tweetCacheFilePath - -> **tweetCacheFilePath**: `string` = `"tweetcache/latest_checked_tweet_id.txt"` - -#### Inherited from - -`ClientBase.tweetCacheFilePath` - -#### Defined in - -[core/src/clients/twitter/base.ts:91](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L91) - ---- - -### twitterClient - -> **twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase.twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L87) - ---- - -### twitterUserId - -> **twitterUserId**: `string` - -#### Inherited from - -`ClientBase.twitterUserId` - -#### Defined in - -[core/src/clients/twitter/base.ts:97](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L97) - ---- - -### \_twitterClient - -> `static` **\_twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase._twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:86](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L86) - ---- - -### captureRejections - -> `static` **captureRejections**: `boolean` - -Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - -Change the default `captureRejections` option on all new `EventEmitter` objects. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejections` - -#### Defined in - -node_modules/@types/node/events.d.ts:459 - ---- - -### captureRejectionSymbol - -> `readonly` `static` **captureRejectionSymbol**: _typeof_ [`captureRejectionSymbol`](TwitterPostClient.md#capturerejectionsymbol) - -Value: `Symbol.for('nodejs.rejection')` - -See how to write a custom `rejection handler`. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejectionSymbol` - -#### Defined in - -node_modules/@types/node/events.d.ts:452 - ---- - -### defaultMaxListeners - -> `static` **defaultMaxListeners**: `number` - -By default, a maximum of `10` listeners can be registered for any single -event. This limit can be changed for individual `EventEmitter` instances -using the `emitter.setMaxListeners(n)` method. To change the default -for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property -can be used. If this value is not a positive number, a `RangeError` is thrown. - -Take caution when setting the `events.defaultMaxListeners` because the -change affects _all_ `EventEmitter` instances, including those created before -the change is made. However, calling `emitter.setMaxListeners(n)` still has -precedence over `events.defaultMaxListeners`. - -This is not a hard limit. The `EventEmitter` instance will allow -more listeners to be added but will output a trace warning to stderr indicating -that a "possible EventEmitter memory leak" has been detected. For any single -`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to -temporarily avoid this warning: - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.setMaxListeners(emitter.getMaxListeners() + 1); -emitter.once("event", () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); -}); -``` - -The `--trace-warnings` command-line flag can be used to display the -stack trace for such warnings. - -The emitted warning can be inspected with `process.on('warning')` and will -have the additional `emitter`, `type`, and `count` properties, referring to -the event emitter instance, the event's name and the number of attached -listeners, respectively. -Its `name` property is set to `'MaxListenersExceededWarning'`. - -#### Since - -v0.11.2 - -#### Inherited from - -`ClientBase.defaultMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:498 - ---- - -### errorMonitor - -> `readonly` `static` **errorMonitor**: _typeof_ [`errorMonitor`](TwitterPostClient.md#errormonitor) - -This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no -regular `'error'` listener is installed. - -#### Since - -v13.6.0, v12.17.0 - -#### Inherited from - -`ClientBase.errorMonitor` - -#### Defined in - -node_modules/@types/node/events.d.ts:445 - -## Methods - -### \[captureRejectionSymbol\]()? - -> `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` - -#### Type Parameters - -• **K** - -#### Parameters - -• **error**: `Error` - -• **event**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`void` - -#### Inherited from - -`ClientBase.[captureRejectionSymbol]` - -#### Defined in - -node_modules/@types/node/events.d.ts:136 - ---- - -### addListener() - -> **addListener**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.on(eventName, listener)`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.addListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:597 - ---- - -### cacheTweet() - -> **cacheTweet**(`tweet`): `Promise`\<`void`\> - -#### Parameters - -• **tweet**: `Tweet` - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.cacheTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:99](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L99) - ---- - -### emit() - -> **emit**\<`K`\>(`eventName`, ...`args`): `boolean` - -Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments -to each. - -Returns `true` if the event had listeners, `false` otherwise. - -```js -import { EventEmitter } from "node:events"; -const myEmitter = new EventEmitter(); - -// First listener -myEmitter.on("event", function firstListener() { - console.log("Helloooo! first listener"); -}); -// Second listener -myEmitter.on("event", function secondListener(arg1, arg2) { - console.log(`event with parameters ${arg1}, ${arg2} in second listener`); -}); -// Third listener -myEmitter.on("event", function thirdListener(...args) { - const parameters = args.join(", "); - console.log(`event with parameters ${parameters} in third listener`); -}); - -console.log(myEmitter.listeners("event")); - -myEmitter.emit("event", 1, 2, 3, 4, 5); - -// Prints: -// [ -// [Function: firstListener], -// [Function: secondListener], -// [Function: thirdListener] -// ] -// Helloooo! first listener -// event with parameters 1, 2 in second listener -// event with parameters 1, 2, 3, 4, 5 in third listener -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`boolean` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.emit` - -#### Defined in - -node_modules/@types/node/events.d.ts:859 - ---- - -### eventNames() - -> **eventNames**(): (`string` \| `symbol`)[] - -Returns an array listing the events for which the emitter has registered -listeners. The values in the array are strings or `Symbol`s. - -```js -import { EventEmitter } from "node:events"; - -const myEE = new EventEmitter(); -myEE.on("foo", () => {}); -myEE.on("bar", () => {}); - -const sym = Symbol("symbol"); -myEE.on(sym, () => {}); - -console.log(myEE.eventNames()); -// Prints: [ 'foo', 'bar', Symbol(symbol) ] -``` - -#### Returns - -(`string` \| `symbol`)[] - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.eventNames` - -#### Defined in - -node_modules/@types/node/events.d.ts:922 - ---- - -### fetchHomeTimeline() - -> **fetchHomeTimeline**(`count`): `Promise`\<`Tweet`[]\> - -#### Parameters - -• **count**: `number` - -#### Returns - -`Promise`\<`Tweet`[]\> - -#### Inherited from - -`ClientBase.fetchHomeTimeline` - -#### Defined in - -[core/src/clients/twitter/base.ts:278](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L278) - ---- - -### fetchSearchTweets() - -> **fetchSearchTweets**(`query`, `maxTweets`, `searchMode`, `cursor`?): `Promise`\<`QueryTweetsResponse`\> - -#### Parameters - -• **query**: `string` - -• **maxTweets**: `number` - -• **searchMode**: `SearchMode` - -• **cursor?**: `string` - -#### Returns - -`Promise`\<`QueryTweetsResponse`\> - -#### Inherited from - -`ClientBase.fetchSearchTweets` - -#### Defined in - -[core/src/clients/twitter/base.ts:330](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L330) - ---- - -### getCachedTweet() - -> **getCachedTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getCachedTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:115](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L115) - ---- - -### getMaxListeners() - -> **getMaxListeners**(): `number` - -Returns the current max listener value for the `EventEmitter` which is either -set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](TwitterInteractionClient.md#defaultmaxlisteners). - -#### Returns - -`number` - -#### Since - -v1.0.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:774 - ---- - -### getTweet() - -> **getTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:137](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L137) - ---- - -### handleTwitterInteractions() - -> **handleTwitterInteractions**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/clients/twitter/interactions.ts:93](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/interactions.ts#L93) - ---- - -### listenerCount() - -> **listenerCount**\<`K`\>(`eventName`, `listener`?): `number` - -Returns the number of listeners listening for the event named `eventName`. -If `listener` is provided, it will return how many times the listener is found -in the list of the listeners of the event. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event being listened for - -• **listener?**: `Function` - -The event handler function - -#### Returns - -`number` - -#### Since - -v3.2.0 - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:868 - ---- - -### listeners() - -> **listeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -console.log(util.inspect(server.listeners("connection"))); -// Prints: [ [Function] ] -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.listeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:787 - ---- - -### off() - -> **off**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.removeListener()`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v10.0.0 - -#### Inherited from - -`ClientBase.off` - -#### Defined in - -node_modules/@types/node/events.d.ts:747 - ---- - -### on() - -> **on**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the end of the listeners array for the event -named `eventName`. No checks are made to see if the `listener` has already -been added. Multiple calls passing the same combination of `eventName` and -`listener` will result in the `listener` being added, and called, multiple times. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.on("foo", () => console.log("a")); -myEE.prependListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.1.101 - -#### Inherited from - -`ClientBase.on` - -#### Defined in - -node_modules/@types/node/events.d.ts:629 - ---- - -### once() - -> **once**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time** `listener` function for the event named `eventName`. The -next time `eventName` is triggered, this listener is removed and then invoked. - -```js -server.once("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.once("foo", () => console.log("a")); -myEE.prependOnceListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.3.0 - -#### Inherited from - -`ClientBase.once` - -#### Defined in - -node_modules/@types/node/events.d.ts:659 - ---- - -### onReady() - -> **onReady**(): `void` - -#### Returns - -`void` - -#### Overrides - -`ClientBase.onReady` - -#### Defined in - -[core/src/clients/twitter/interactions.ts:76](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/interactions.ts#L76) - ---- - -### prependListener() - -> **prependListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the _beginning_ of the listeners array for the -event named `eventName`. No checks are made to see if the `listener` has -already been added. Multiple calls passing the same combination of `eventName` -and `listener` will result in the `listener` being added, and called, multiple times. - -```js -server.prependListener("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:886 - ---- - -### prependOnceListener() - -> **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this -listener is removed, and then invoked. - -```js -server.prependOnceListener("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependOnceListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:902 - ---- - -### rawListeners() - -> **rawListeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`, -including any wrappers (such as those created by `.once()`). - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.once("log", () => console.log("log once")); - -// Returns a new Array with a function `onceWrapper` which has a property -// `listener` which contains the original listener bound above -const listeners = emitter.rawListeners("log"); -const logFnWrapper = listeners[0]; - -// Logs "log once" to the console and does not unbind the `once` event -logFnWrapper.listener(); - -// Logs "log once" to the console and removes the listener -logFnWrapper(); - -emitter.on("log", () => console.log("log persistently")); -// Will return a new Array with a single function bound by `.on()` above -const newListeners = emitter.rawListeners("log"); - -// Logs "log persistently" twice -newListeners[0](); -emitter.emit("log"); -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v9.4.0 - -#### Inherited from - -`ClientBase.rawListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:818 - ---- - -### removeAllListeners() - -> **removeAllListeners**(`eventName`?): `this` - -Removes all listeners, or those of the specified `eventName`. - -It is bad practice to remove listeners added elsewhere in the code, -particularly when the `EventEmitter` instance was created by some other -component or module (e.g. sockets or file streams). - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **eventName?**: `string` \| `symbol` - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeAllListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:758 - ---- - -### removeListener() - -> **removeListener**\<`K`\>(`eventName`, `listener`): `this` - -Removes the specified `listener` from the listener array for the event named `eventName`. - -```js -const callback = (stream) => { - console.log("someone connected!"); -}; -server.on("connection", callback); -// ... -server.removeListener("connection", callback); -``` - -`removeListener()` will remove, at most, one instance of a listener from the -listener array. If any single listener has been added multiple times to the -listener array for the specified `eventName`, then `removeListener()` must be -called multiple times to remove each instance. - -Once an event is emitted, all listeners attached to it at the -time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution -will not remove them from`emit()` in progress. Subsequent events behave as expected. - -```js -import { EventEmitter } from "node:events"; -class MyEmitter extends EventEmitter {} -const myEmitter = new MyEmitter(); - -const callbackA = () => { - console.log("A"); - myEmitter.removeListener("event", callbackB); -}; - -const callbackB = () => { - console.log("B"); -}; - -myEmitter.on("event", callbackA); - -myEmitter.on("event", callbackB); - -// callbackA removes listener callbackB but it will still be called. -// Internal listener array at time of emit [callbackA, callbackB] -myEmitter.emit("event"); -// Prints: -// A -// B - -// callbackB is now removed. -// Internal listener array [callbackA] -myEmitter.emit("event"); -// Prints: -// A -``` - -Because listeners are managed using an internal array, calling this will -change the position indices of any listener registered _after_ the listener -being removed. This will not impact the order in which listeners are called, -but it means that any copies of the listener array as returned by -the `emitter.listeners()` method will need to be recreated. - -When a single function has been added as a handler multiple times for a single -event (as in the example below), `removeListener()` will remove the most -recently added instance. In the example the `once('ping')` listener is removed: - -```js -import { EventEmitter } from "node:events"; -const ee = new EventEmitter(); - -function pong() { - console.log("pong"); -} - -ee.on("ping", pong); -ee.once("ping", pong); -ee.removeListener("ping", pong); - -ee.emit("ping"); -ee.emit("ping"); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:742 - ---- - -### saveRequestMessage() - -> **saveRequestMessage**(`message`, `state`): `Promise`\<`void`\> - -#### Parameters - -• **message**: [`Memory`](../interfaces/Memory.md) - -• **state**: [`State`](../interfaces/State.md) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.saveRequestMessage` - -#### Defined in - -[core/src/clients/twitter/base.ts:572](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L572) - ---- - -### setCookiesFromArray() - -> **setCookiesFromArray**(`cookiesArray`): `Promise`\<`void`\> - -#### Parameters - -• **cookiesArray**: `any`[] - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.setCookiesFromArray` - -#### Defined in - -[core/src/clients/twitter/base.ts:560](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L560) - ---- - -### setMaxListeners() - -> **setMaxListeners**(`n`): `this` - -By default `EventEmitter`s will print a warning if more than `10` listeners are -added for a particular event. This is a useful default that helps finding -memory leaks. The `emitter.setMaxListeners()` method allows the limit to be -modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **n**: `number` - -#### Returns - -`this` - -#### Since - -v0.3.5 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:768 - ---- - -### addAbortListener() - -> `static` **addAbortListener**(`signal`, `resource`): `Disposable` - -**`Experimental`** - -Listens once to the `abort` event on the provided `signal`. - -Listening to the `abort` event on abort signals is unsafe and may -lead to resource leaks since another third party with the signal can -call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change -this since it would violate the web standard. Additionally, the original -API makes it easy to forget to remove listeners. - -This API allows safely using `AbortSignal`s in Node.js APIs by solving these -two issues by listening to the event such that `stopImmediatePropagation` does -not prevent the listener from running. - -Returns a disposable so that it may be unsubscribed from more easily. - -```js -import { addAbortListener } from "node:events"; - -function example(signal) { - let disposable; - try { - signal.addEventListener("abort", (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } -} -``` - -#### Parameters - -• **signal**: `AbortSignal` - -• **resource** - -#### Returns - -`Disposable` - -Disposable that removes the `abort` listener. - -#### Since - -v20.5.0 - -#### Inherited from - -`ClientBase.addAbortListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:437 - ---- - -### getEventListeners() - -> `static` **getEventListeners**(`emitter`, `name`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -For `EventEmitter`s this behaves exactly the same as calling `.listeners` on -the emitter. - -For `EventTarget`s this is the only way to get the event listeners for the -event target. This is useful for debugging and diagnostic purposes. - -```js -import { getEventListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - const listener = () => console.log("Events are fun"); - ee.on("foo", listener); - console.log(getEventListeners(ee, "foo")); // [ [Function: listener] ] -} -{ - const et = new EventTarget(); - const listener = () => console.log("Events are fun"); - et.addEventListener("foo", listener); - console.log(getEventListeners(et, "foo")); // [ [Function: listener] ] -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -• **name**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v15.2.0, v14.17.0 - -#### Inherited from - -`ClientBase.getEventListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:358 - ---- - -### getMaxListeners() - -> `static` **getMaxListeners**(`emitter`): `number` - -Returns the currently set max amount of listeners. - -For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on -the emitter. - -For `EventTarget`s this is the only way to get the max event listeners for the -event target. If the number of event handlers on a single EventTarget exceeds -the max set, the EventTarget will print a warning. - -```js -import { getMaxListeners, setMaxListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - console.log(getMaxListeners(ee)); // 10 - setMaxListeners(11, ee); - console.log(getMaxListeners(ee)); // 11 -} -{ - const et = new EventTarget(); - console.log(getMaxListeners(et)); // 10 - setMaxListeners(11, et); - console.log(getMaxListeners(et)); // 11 -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -#### Returns - -`number` - -#### Since - -v19.9.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:387 - ---- - -### ~~listenerCount()~~ - -> `static` **listenerCount**(`emitter`, `eventName`): `number` - -A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - -```js -import { EventEmitter, listenerCount } from "node:events"; - -const myEmitter = new EventEmitter(); -myEmitter.on("event", () => {}); -myEmitter.on("event", () => {}); -console.log(listenerCount(myEmitter, "event")); -// Prints: 2 -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -The emitter to query - -• **eventName**: `string` \| `symbol` - -The event name - -#### Returns - -`number` - -#### Since - -v0.9.12 - -#### Deprecated - -Since v3.2.0 - Use `listenerCount` instead. - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:330 - ---- - -### on() - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); -}); - -for await (const event of on(ee, "foo")) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] -} -// Unreachable here -``` - -Returns an `AsyncIterator` that iterates `eventName` events. It will throw -if the `EventEmitter` emits `'error'`. It removes all listeners when -exiting the loop. The `value` returned by each iteration is an array -composed of the emitted event arguments. - -An `AbortSignal` can be used to cancel waiting on events: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ac = new AbortController(); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - }); - - for await (const event of on(ee, "foo", { signal: ac.signal })) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); - -process.nextTick(() => ac.abort()); -``` - -Use the `close` option to specify an array of event names that will end the iteration: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - ee.emit("close"); -}); - -for await (const event of on(ee, "foo", { close: ["close"] })) { - console.log(event); // prints ['bar'] [42] -} -// the loop will exit after 'close' is emitted -console.log("done"); // prints 'done' -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - -##### Since - -v13.6.0, v12.16.0 - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:303 - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:308 - ---- - -### once() - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given -event or that is rejected if the `EventEmitter` emits `'error'` while waiting. -The `Promise` will resolve with an array of all the arguments emitted to the -given event. - -This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event -semantics and does not listen to the `'error'` event. - -```js -import { once, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -process.nextTick(() => { - ee.emit("myevent", 42); -}); - -const [value] = await once(ee, "myevent"); -console.log(value); - -const err = new Error("kaboom"); -process.nextTick(() => { - ee.emit("error", err); -}); - -try { - await once(ee, "myevent"); -} catch (err) { - console.error("error happened", err); -} -``` - -The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the -'`error'` event itself, then it is treated as any other kind of event without -special handling: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); - -once(ee, "error") - .then(([err]) => console.log("ok", err.message)) - .catch((err) => console.error("error", err.message)); - -ee.emit("error", new Error("boom")); - -// Prints: ok boom -``` - -An `AbortSignal` can be used to cancel waiting for the event: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); -const ac = new AbortController(); - -async function foo(emitter, event, signal) { - try { - await once(emitter, event, { signal }); - console.log("event emitted!"); - } catch (error) { - if (error.name === "AbortError") { - console.error("Waiting for the event was canceled!"); - } else { - console.error("There was an error", error.message); - } - } -} - -foo(ee, "foo", ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit("foo"); // Prints: Waiting for the event was canceled! -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Since - -v11.13.0, v10.16.0 - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:217 - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:222 - ---- - -### setMaxListeners() - -> `static` **setMaxListeners**(`n`?, ...`eventTargets`?): `void` - -```js -import { setMaxListeners, EventEmitter } from "node:events"; - -const target = new EventTarget(); -const emitter = new EventEmitter(); - -setMaxListeners(5, target, emitter); -``` - -#### Parameters - -• **n?**: `number` - -A non-negative number. The maximum number of listeners per `EventTarget` event. - -• ...**eventTargets?**: (`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] - -Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} -objects. - -#### Returns - -`void` - -#### Since - -v15.4.0 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:402 diff --git a/docs/docs/api/classes/TwitterPostClient.md b/docs/docs/api/classes/TwitterPostClient.md deleted file mode 100644 index fbf83d8f83c..00000000000 --- a/docs/docs/api/classes/TwitterPostClient.md +++ /dev/null @@ -1,1784 +0,0 @@ -# Class: TwitterPostClient - -## Extends - -- `ClientBase` - -## Constructors - -### new TwitterPostClient() - -> **new TwitterPostClient**(`runtime`): [`TwitterPostClient`](TwitterPostClient.md) - -#### Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Returns - -[`TwitterPostClient`](TwitterPostClient.md) - -#### Overrides - -`ClientBase.constructor` - -#### Defined in - -[core/src/clients/twitter/post.ts:41](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/post.ts#L41) - -## Properties - -### callback() - -> **callback**: (`self`) => `any` = `null` - -#### Parameters - -• **self**: `ClientBase` - -#### Returns - -`any` - -#### Inherited from - -`ClientBase.callback` - -#### Defined in - -[core/src/clients/twitter/base.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L150) - ---- - -### directions - -> **directions**: `string` - -#### Inherited from - -`ClientBase.directions` - -#### Defined in - -[core/src/clients/twitter/base.ts:89](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L89) - ---- - -### imageDescriptionService - -> **imageDescriptionService**: `ImageDescriptionService` - -#### Inherited from - -`ClientBase.imageDescriptionService` - -#### Defined in - -[core/src/clients/twitter/base.ts:92](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L92) - ---- - -### lastCheckedTweetId - -> **lastCheckedTweetId**: `number` = `null` - -#### Inherited from - -`ClientBase.lastCheckedTweetId` - -#### Defined in - -[core/src/clients/twitter/base.ts:90](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L90) - ---- - -### requestQueue - -> **requestQueue**: `RequestQueue` - -#### Inherited from - -`ClientBase.requestQueue` - -#### Defined in - -[core/src/clients/twitter/base.ts:96](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L96) - ---- - -### runtime - -> **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Inherited from - -`ClientBase.runtime` - -#### Defined in - -[core/src/clients/twitter/base.ts:88](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L88) - ---- - -### temperature - -> **temperature**: `number` = `0.5` - -#### Inherited from - -`ClientBase.temperature` - -#### Defined in - -[core/src/clients/twitter/base.ts:93](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L93) - ---- - -### tweetCacheFilePath - -> **tweetCacheFilePath**: `string` = `"tweetcache/latest_checked_tweet_id.txt"` - -#### Inherited from - -`ClientBase.tweetCacheFilePath` - -#### Defined in - -[core/src/clients/twitter/base.ts:91](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L91) - ---- - -### twitterClient - -> **twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase.twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L87) - ---- - -### twitterUserId - -> **twitterUserId**: `string` - -#### Inherited from - -`ClientBase.twitterUserId` - -#### Defined in - -[core/src/clients/twitter/base.ts:97](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L97) - ---- - -### \_twitterClient - -> `static` **\_twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase._twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:86](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L86) - ---- - -### captureRejections - -> `static` **captureRejections**: `boolean` - -Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - -Change the default `captureRejections` option on all new `EventEmitter` objects. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejections` - -#### Defined in - -node_modules/@types/node/events.d.ts:459 - ---- - -### captureRejectionSymbol - -> `readonly` `static` **captureRejectionSymbol**: _typeof_ [`captureRejectionSymbol`](TwitterPostClient.md#capturerejectionsymbol) - -Value: `Symbol.for('nodejs.rejection')` - -See how to write a custom `rejection handler`. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejectionSymbol` - -#### Defined in - -node_modules/@types/node/events.d.ts:452 - ---- - -### defaultMaxListeners - -> `static` **defaultMaxListeners**: `number` - -By default, a maximum of `10` listeners can be registered for any single -event. This limit can be changed for individual `EventEmitter` instances -using the `emitter.setMaxListeners(n)` method. To change the default -for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property -can be used. If this value is not a positive number, a `RangeError` is thrown. - -Take caution when setting the `events.defaultMaxListeners` because the -change affects _all_ `EventEmitter` instances, including those created before -the change is made. However, calling `emitter.setMaxListeners(n)` still has -precedence over `events.defaultMaxListeners`. - -This is not a hard limit. The `EventEmitter` instance will allow -more listeners to be added but will output a trace warning to stderr indicating -that a "possible EventEmitter memory leak" has been detected. For any single -`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to -temporarily avoid this warning: - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.setMaxListeners(emitter.getMaxListeners() + 1); -emitter.once("event", () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); -}); -``` - -The `--trace-warnings` command-line flag can be used to display the -stack trace for such warnings. - -The emitted warning can be inspected with `process.on('warning')` and will -have the additional `emitter`, `type`, and `count` properties, referring to -the event emitter instance, the event's name and the number of attached -listeners, respectively. -Its `name` property is set to `'MaxListenersExceededWarning'`. - -#### Since - -v0.11.2 - -#### Inherited from - -`ClientBase.defaultMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:498 - ---- - -### errorMonitor - -> `readonly` `static` **errorMonitor**: _typeof_ [`errorMonitor`](TwitterPostClient.md#errormonitor) - -This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no -regular `'error'` listener is installed. - -#### Since - -v13.6.0, v12.17.0 - -#### Inherited from - -`ClientBase.errorMonitor` - -#### Defined in - -node_modules/@types/node/events.d.ts:445 - -## Methods - -### \[captureRejectionSymbol\]()? - -> `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` - -#### Type Parameters - -• **K** - -#### Parameters - -• **error**: `Error` - -• **event**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`void` - -#### Inherited from - -`ClientBase.[captureRejectionSymbol]` - -#### Defined in - -node_modules/@types/node/events.d.ts:136 - ---- - -### addListener() - -> **addListener**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.on(eventName, listener)`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.addListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:597 - ---- - -### cacheTweet() - -> **cacheTweet**(`tweet`): `Promise`\<`void`\> - -#### Parameters - -• **tweet**: `Tweet` - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.cacheTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:99](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L99) - ---- - -### emit() - -> **emit**\<`K`\>(`eventName`, ...`args`): `boolean` - -Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments -to each. - -Returns `true` if the event had listeners, `false` otherwise. - -```js -import { EventEmitter } from "node:events"; -const myEmitter = new EventEmitter(); - -// First listener -myEmitter.on("event", function firstListener() { - console.log("Helloooo! first listener"); -}); -// Second listener -myEmitter.on("event", function secondListener(arg1, arg2) { - console.log(`event with parameters ${arg1}, ${arg2} in second listener`); -}); -// Third listener -myEmitter.on("event", function thirdListener(...args) { - const parameters = args.join(", "); - console.log(`event with parameters ${parameters} in third listener`); -}); - -console.log(myEmitter.listeners("event")); - -myEmitter.emit("event", 1, 2, 3, 4, 5); - -// Prints: -// [ -// [Function: firstListener], -// [Function: secondListener], -// [Function: thirdListener] -// ] -// Helloooo! first listener -// event with parameters 1, 2 in second listener -// event with parameters 1, 2, 3, 4, 5 in third listener -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`boolean` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.emit` - -#### Defined in - -node_modules/@types/node/events.d.ts:859 - ---- - -### eventNames() - -> **eventNames**(): (`string` \| `symbol`)[] - -Returns an array listing the events for which the emitter has registered -listeners. The values in the array are strings or `Symbol`s. - -```js -import { EventEmitter } from "node:events"; - -const myEE = new EventEmitter(); -myEE.on("foo", () => {}); -myEE.on("bar", () => {}); - -const sym = Symbol("symbol"); -myEE.on(sym, () => {}); - -console.log(myEE.eventNames()); -// Prints: [ 'foo', 'bar', Symbol(symbol) ] -``` - -#### Returns - -(`string` \| `symbol`)[] - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.eventNames` - -#### Defined in - -node_modules/@types/node/events.d.ts:922 - ---- - -### fetchHomeTimeline() - -> **fetchHomeTimeline**(`count`): `Promise`\<`Tweet`[]\> - -#### Parameters - -• **count**: `number` - -#### Returns - -`Promise`\<`Tweet`[]\> - -#### Inherited from - -`ClientBase.fetchHomeTimeline` - -#### Defined in - -[core/src/clients/twitter/base.ts:278](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L278) - ---- - -### fetchSearchTweets() - -> **fetchSearchTweets**(`query`, `maxTweets`, `searchMode`, `cursor`?): `Promise`\<`QueryTweetsResponse`\> - -#### Parameters - -• **query**: `string` - -• **maxTweets**: `number` - -• **searchMode**: `SearchMode` - -• **cursor?**: `string` - -#### Returns - -`Promise`\<`QueryTweetsResponse`\> - -#### Inherited from - -`ClientBase.fetchSearchTweets` - -#### Defined in - -[core/src/clients/twitter/base.ts:330](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L330) - ---- - -### getCachedTweet() - -> **getCachedTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getCachedTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:115](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L115) - ---- - -### getMaxListeners() - -> **getMaxListeners**(): `number` - -Returns the current max listener value for the `EventEmitter` which is either -set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](TwitterPostClient.md#defaultmaxlisteners). - -#### Returns - -`number` - -#### Since - -v1.0.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:774 - ---- - -### getTweet() - -> **getTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:137](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L137) - ---- - -### listenerCount() - -> **listenerCount**\<`K`\>(`eventName`, `listener`?): `number` - -Returns the number of listeners listening for the event named `eventName`. -If `listener` is provided, it will return how many times the listener is found -in the list of the listeners of the event. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event being listened for - -• **listener?**: `Function` - -The event handler function - -#### Returns - -`number` - -#### Since - -v3.2.0 - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:868 - ---- - -### listeners() - -> **listeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -console.log(util.inspect(server.listeners("connection"))); -// Prints: [ [Function] ] -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.listeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:787 - ---- - -### off() - -> **off**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.removeListener()`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v10.0.0 - -#### Inherited from - -`ClientBase.off` - -#### Defined in - -node_modules/@types/node/events.d.ts:747 - ---- - -### on() - -> **on**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the end of the listeners array for the event -named `eventName`. No checks are made to see if the `listener` has already -been added. Multiple calls passing the same combination of `eventName` and -`listener` will result in the `listener` being added, and called, multiple times. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.on("foo", () => console.log("a")); -myEE.prependListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.1.101 - -#### Inherited from - -`ClientBase.on` - -#### Defined in - -node_modules/@types/node/events.d.ts:629 - ---- - -### once() - -> **once**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time** `listener` function for the event named `eventName`. The -next time `eventName` is triggered, this listener is removed and then invoked. - -```js -server.once("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.once("foo", () => console.log("a")); -myEE.prependOnceListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.3.0 - -#### Inherited from - -`ClientBase.once` - -#### Defined in - -node_modules/@types/node/events.d.ts:659 - ---- - -### onReady() - -> **onReady**(): `void` - -#### Returns - -`void` - -#### Overrides - -`ClientBase.onReady` - -#### Defined in - -[core/src/clients/twitter/post.ts:28](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/post.ts#L28) - ---- - -### prependListener() - -> **prependListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the _beginning_ of the listeners array for the -event named `eventName`. No checks are made to see if the `listener` has -already been added. Multiple calls passing the same combination of `eventName` -and `listener` will result in the `listener` being added, and called, multiple times. - -```js -server.prependListener("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:886 - ---- - -### prependOnceListener() - -> **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this -listener is removed, and then invoked. - -```js -server.prependOnceListener("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependOnceListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:902 - ---- - -### rawListeners() - -> **rawListeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`, -including any wrappers (such as those created by `.once()`). - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.once("log", () => console.log("log once")); - -// Returns a new Array with a function `onceWrapper` which has a property -// `listener` which contains the original listener bound above -const listeners = emitter.rawListeners("log"); -const logFnWrapper = listeners[0]; - -// Logs "log once" to the console and does not unbind the `once` event -logFnWrapper.listener(); - -// Logs "log once" to the console and removes the listener -logFnWrapper(); - -emitter.on("log", () => console.log("log persistently")); -// Will return a new Array with a single function bound by `.on()` above -const newListeners = emitter.rawListeners("log"); - -// Logs "log persistently" twice -newListeners[0](); -emitter.emit("log"); -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v9.4.0 - -#### Inherited from - -`ClientBase.rawListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:818 - ---- - -### removeAllListeners() - -> **removeAllListeners**(`eventName`?): `this` - -Removes all listeners, or those of the specified `eventName`. - -It is bad practice to remove listeners added elsewhere in the code, -particularly when the `EventEmitter` instance was created by some other -component or module (e.g. sockets or file streams). - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **eventName?**: `string` \| `symbol` - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeAllListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:758 - ---- - -### removeListener() - -> **removeListener**\<`K`\>(`eventName`, `listener`): `this` - -Removes the specified `listener` from the listener array for the event named `eventName`. - -```js -const callback = (stream) => { - console.log("someone connected!"); -}; -server.on("connection", callback); -// ... -server.removeListener("connection", callback); -``` - -`removeListener()` will remove, at most, one instance of a listener from the -listener array. If any single listener has been added multiple times to the -listener array for the specified `eventName`, then `removeListener()` must be -called multiple times to remove each instance. - -Once an event is emitted, all listeners attached to it at the -time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution -will not remove them from`emit()` in progress. Subsequent events behave as expected. - -```js -import { EventEmitter } from "node:events"; -class MyEmitter extends EventEmitter {} -const myEmitter = new MyEmitter(); - -const callbackA = () => { - console.log("A"); - myEmitter.removeListener("event", callbackB); -}; - -const callbackB = () => { - console.log("B"); -}; - -myEmitter.on("event", callbackA); - -myEmitter.on("event", callbackB); - -// callbackA removes listener callbackB but it will still be called. -// Internal listener array at time of emit [callbackA, callbackB] -myEmitter.emit("event"); -// Prints: -// A -// B - -// callbackB is now removed. -// Internal listener array [callbackA] -myEmitter.emit("event"); -// Prints: -// A -``` - -Because listeners are managed using an internal array, calling this will -change the position indices of any listener registered _after_ the listener -being removed. This will not impact the order in which listeners are called, -but it means that any copies of the listener array as returned by -the `emitter.listeners()` method will need to be recreated. - -When a single function has been added as a handler multiple times for a single -event (as in the example below), `removeListener()` will remove the most -recently added instance. In the example the `once('ping')` listener is removed: - -```js -import { EventEmitter } from "node:events"; -const ee = new EventEmitter(); - -function pong() { - console.log("pong"); -} - -ee.on("ping", pong); -ee.once("ping", pong); -ee.removeListener("ping", pong); - -ee.emit("ping"); -ee.emit("ping"); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:742 - ---- - -### saveRequestMessage() - -> **saveRequestMessage**(`message`, `state`): `Promise`\<`void`\> - -#### Parameters - -• **message**: [`Memory`](../interfaces/Memory.md) - -• **state**: [`State`](../interfaces/State.md) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.saveRequestMessage` - -#### Defined in - -[core/src/clients/twitter/base.ts:572](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L572) - ---- - -### setCookiesFromArray() - -> **setCookiesFromArray**(`cookiesArray`): `Promise`\<`void`\> - -#### Parameters - -• **cookiesArray**: `any`[] - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.setCookiesFromArray` - -#### Defined in - -[core/src/clients/twitter/base.ts:560](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L560) - ---- - -### setMaxListeners() - -> **setMaxListeners**(`n`): `this` - -By default `EventEmitter`s will print a warning if more than `10` listeners are -added for a particular event. This is a useful default that helps finding -memory leaks. The `emitter.setMaxListeners()` method allows the limit to be -modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **n**: `number` - -#### Returns - -`this` - -#### Since - -v0.3.5 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:768 - ---- - -### addAbortListener() - -> `static` **addAbortListener**(`signal`, `resource`): `Disposable` - -**`Experimental`** - -Listens once to the `abort` event on the provided `signal`. - -Listening to the `abort` event on abort signals is unsafe and may -lead to resource leaks since another third party with the signal can -call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change -this since it would violate the web standard. Additionally, the original -API makes it easy to forget to remove listeners. - -This API allows safely using `AbortSignal`s in Node.js APIs by solving these -two issues by listening to the event such that `stopImmediatePropagation` does -not prevent the listener from running. - -Returns a disposable so that it may be unsubscribed from more easily. - -```js -import { addAbortListener } from "node:events"; - -function example(signal) { - let disposable; - try { - signal.addEventListener("abort", (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } -} -``` - -#### Parameters - -• **signal**: `AbortSignal` - -• **resource** - -#### Returns - -`Disposable` - -Disposable that removes the `abort` listener. - -#### Since - -v20.5.0 - -#### Inherited from - -`ClientBase.addAbortListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:437 - ---- - -### getEventListeners() - -> `static` **getEventListeners**(`emitter`, `name`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -For `EventEmitter`s this behaves exactly the same as calling `.listeners` on -the emitter. - -For `EventTarget`s this is the only way to get the event listeners for the -event target. This is useful for debugging and diagnostic purposes. - -```js -import { getEventListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - const listener = () => console.log("Events are fun"); - ee.on("foo", listener); - console.log(getEventListeners(ee, "foo")); // [ [Function: listener] ] -} -{ - const et = new EventTarget(); - const listener = () => console.log("Events are fun"); - et.addEventListener("foo", listener); - console.log(getEventListeners(et, "foo")); // [ [Function: listener] ] -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -• **name**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v15.2.0, v14.17.0 - -#### Inherited from - -`ClientBase.getEventListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:358 - ---- - -### getMaxListeners() - -> `static` **getMaxListeners**(`emitter`): `number` - -Returns the currently set max amount of listeners. - -For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on -the emitter. - -For `EventTarget`s this is the only way to get the max event listeners for the -event target. If the number of event handlers on a single EventTarget exceeds -the max set, the EventTarget will print a warning. - -```js -import { getMaxListeners, setMaxListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - console.log(getMaxListeners(ee)); // 10 - setMaxListeners(11, ee); - console.log(getMaxListeners(ee)); // 11 -} -{ - const et = new EventTarget(); - console.log(getMaxListeners(et)); // 10 - setMaxListeners(11, et); - console.log(getMaxListeners(et)); // 11 -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -#### Returns - -`number` - -#### Since - -v19.9.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:387 - ---- - -### ~~listenerCount()~~ - -> `static` **listenerCount**(`emitter`, `eventName`): `number` - -A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - -```js -import { EventEmitter, listenerCount } from "node:events"; - -const myEmitter = new EventEmitter(); -myEmitter.on("event", () => {}); -myEmitter.on("event", () => {}); -console.log(listenerCount(myEmitter, "event")); -// Prints: 2 -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -The emitter to query - -• **eventName**: `string` \| `symbol` - -The event name - -#### Returns - -`number` - -#### Since - -v0.9.12 - -#### Deprecated - -Since v3.2.0 - Use `listenerCount` instead. - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:330 - ---- - -### on() - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); -}); - -for await (const event of on(ee, "foo")) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] -} -// Unreachable here -``` - -Returns an `AsyncIterator` that iterates `eventName` events. It will throw -if the `EventEmitter` emits `'error'`. It removes all listeners when -exiting the loop. The `value` returned by each iteration is an array -composed of the emitted event arguments. - -An `AbortSignal` can be used to cancel waiting on events: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ac = new AbortController(); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - }); - - for await (const event of on(ee, "foo", { signal: ac.signal })) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); - -process.nextTick(() => ac.abort()); -``` - -Use the `close` option to specify an array of event names that will end the iteration: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - ee.emit("close"); -}); - -for await (const event of on(ee, "foo", { close: ["close"] })) { - console.log(event); // prints ['bar'] [42] -} -// the loop will exit after 'close' is emitted -console.log("done"); // prints 'done' -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - -##### Since - -v13.6.0, v12.16.0 - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:303 - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:308 - ---- - -### once() - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given -event or that is rejected if the `EventEmitter` emits `'error'` while waiting. -The `Promise` will resolve with an array of all the arguments emitted to the -given event. - -This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event -semantics and does not listen to the `'error'` event. - -```js -import { once, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -process.nextTick(() => { - ee.emit("myevent", 42); -}); - -const [value] = await once(ee, "myevent"); -console.log(value); - -const err = new Error("kaboom"); -process.nextTick(() => { - ee.emit("error", err); -}); - -try { - await once(ee, "myevent"); -} catch (err) { - console.error("error happened", err); -} -``` - -The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the -'`error'` event itself, then it is treated as any other kind of event without -special handling: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); - -once(ee, "error") - .then(([err]) => console.log("ok", err.message)) - .catch((err) => console.error("error", err.message)); - -ee.emit("error", new Error("boom")); - -// Prints: ok boom -``` - -An `AbortSignal` can be used to cancel waiting for the event: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); -const ac = new AbortController(); - -async function foo(emitter, event, signal) { - try { - await once(emitter, event, { signal }); - console.log("event emitted!"); - } catch (error) { - if (error.name === "AbortError") { - console.error("Waiting for the event was canceled!"); - } else { - console.error("There was an error", error.message); - } - } -} - -foo(ee, "foo", ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit("foo"); // Prints: Waiting for the event was canceled! -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Since - -v11.13.0, v10.16.0 - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:217 - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:222 - ---- - -### setMaxListeners() - -> `static` **setMaxListeners**(`n`?, ...`eventTargets`?): `void` - -```js -import { setMaxListeners, EventEmitter } from "node:events"; - -const target = new EventTarget(); -const emitter = new EventEmitter(); - -setMaxListeners(5, target, emitter); -``` - -#### Parameters - -• **n?**: `number` - -A non-negative number. The maximum number of listeners per `EventTarget` event. - -• ...**eventTargets?**: (`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] - -Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} -objects. - -#### Returns - -`void` - -#### Since - -v15.4.0 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:402 diff --git a/docs/docs/api/classes/TwitterSearchClient.md b/docs/docs/api/classes/TwitterSearchClient.md deleted file mode 100644 index ab977bd41e2..00000000000 --- a/docs/docs/api/classes/TwitterSearchClient.md +++ /dev/null @@ -1,1784 +0,0 @@ -# Class: TwitterSearchClient - -## Extends - -- `ClientBase` - -## Constructors - -### new TwitterSearchClient() - -> **new TwitterSearchClient**(`runtime`): [`TwitterSearchClient`](TwitterSearchClient.md) - -#### Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Returns - -[`TwitterSearchClient`](TwitterSearchClient.md) - -#### Overrides - -`ClientBase.constructor` - -#### Defined in - -[core/src/clients/twitter/search.ts:53](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/search.ts#L53) - -## Properties - -### callback() - -> **callback**: (`self`) => `any` = `null` - -#### Parameters - -• **self**: `ClientBase` - -#### Returns - -`any` - -#### Inherited from - -`ClientBase.callback` - -#### Defined in - -[core/src/clients/twitter/base.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L150) - ---- - -### directions - -> **directions**: `string` - -#### Inherited from - -`ClientBase.directions` - -#### Defined in - -[core/src/clients/twitter/base.ts:89](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L89) - ---- - -### imageDescriptionService - -> **imageDescriptionService**: `ImageDescriptionService` - -#### Inherited from - -`ClientBase.imageDescriptionService` - -#### Defined in - -[core/src/clients/twitter/base.ts:92](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L92) - ---- - -### lastCheckedTweetId - -> **lastCheckedTweetId**: `number` = `null` - -#### Inherited from - -`ClientBase.lastCheckedTweetId` - -#### Defined in - -[core/src/clients/twitter/base.ts:90](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L90) - ---- - -### requestQueue - -> **requestQueue**: `RequestQueue` - -#### Inherited from - -`ClientBase.requestQueue` - -#### Defined in - -[core/src/clients/twitter/base.ts:96](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L96) - ---- - -### runtime - -> **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -#### Inherited from - -`ClientBase.runtime` - -#### Defined in - -[core/src/clients/twitter/base.ts:88](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L88) - ---- - -### temperature - -> **temperature**: `number` = `0.5` - -#### Inherited from - -`ClientBase.temperature` - -#### Defined in - -[core/src/clients/twitter/base.ts:93](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L93) - ---- - -### tweetCacheFilePath - -> **tweetCacheFilePath**: `string` = `"tweetcache/latest_checked_tweet_id.txt"` - -#### Inherited from - -`ClientBase.tweetCacheFilePath` - -#### Defined in - -[core/src/clients/twitter/base.ts:91](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L91) - ---- - -### twitterClient - -> **twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase.twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:87](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L87) - ---- - -### twitterUserId - -> **twitterUserId**: `string` - -#### Inherited from - -`ClientBase.twitterUserId` - -#### Defined in - -[core/src/clients/twitter/base.ts:97](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L97) - ---- - -### \_twitterClient - -> `static` **\_twitterClient**: `Scraper` - -#### Inherited from - -`ClientBase._twitterClient` - -#### Defined in - -[core/src/clients/twitter/base.ts:86](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L86) - ---- - -### captureRejections - -> `static` **captureRejections**: `boolean` - -Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - -Change the default `captureRejections` option on all new `EventEmitter` objects. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejections` - -#### Defined in - -node_modules/@types/node/events.d.ts:459 - ---- - -### captureRejectionSymbol - -> `readonly` `static` **captureRejectionSymbol**: _typeof_ [`captureRejectionSymbol`](TwitterPostClient.md#capturerejectionsymbol) - -Value: `Symbol.for('nodejs.rejection')` - -See how to write a custom `rejection handler`. - -#### Since - -v13.4.0, v12.16.0 - -#### Inherited from - -`ClientBase.captureRejectionSymbol` - -#### Defined in - -node_modules/@types/node/events.d.ts:452 - ---- - -### defaultMaxListeners - -> `static` **defaultMaxListeners**: `number` - -By default, a maximum of `10` listeners can be registered for any single -event. This limit can be changed for individual `EventEmitter` instances -using the `emitter.setMaxListeners(n)` method. To change the default -for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property -can be used. If this value is not a positive number, a `RangeError` is thrown. - -Take caution when setting the `events.defaultMaxListeners` because the -change affects _all_ `EventEmitter` instances, including those created before -the change is made. However, calling `emitter.setMaxListeners(n)` still has -precedence over `events.defaultMaxListeners`. - -This is not a hard limit. The `EventEmitter` instance will allow -more listeners to be added but will output a trace warning to stderr indicating -that a "possible EventEmitter memory leak" has been detected. For any single -`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to -temporarily avoid this warning: - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.setMaxListeners(emitter.getMaxListeners() + 1); -emitter.once("event", () => { - // do stuff - emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); -}); -``` - -The `--trace-warnings` command-line flag can be used to display the -stack trace for such warnings. - -The emitted warning can be inspected with `process.on('warning')` and will -have the additional `emitter`, `type`, and `count` properties, referring to -the event emitter instance, the event's name and the number of attached -listeners, respectively. -Its `name` property is set to `'MaxListenersExceededWarning'`. - -#### Since - -v0.11.2 - -#### Inherited from - -`ClientBase.defaultMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:498 - ---- - -### errorMonitor - -> `readonly` `static` **errorMonitor**: _typeof_ [`errorMonitor`](TwitterPostClient.md#errormonitor) - -This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no -regular `'error'` listener is installed. - -#### Since - -v13.6.0, v12.17.0 - -#### Inherited from - -`ClientBase.errorMonitor` - -#### Defined in - -node_modules/@types/node/events.d.ts:445 - -## Methods - -### \[captureRejectionSymbol\]()? - -> `optional` **\[captureRejectionSymbol\]**\<`K`\>(`error`, `event`, ...`args`): `void` - -#### Type Parameters - -• **K** - -#### Parameters - -• **error**: `Error` - -• **event**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`void` - -#### Inherited from - -`ClientBase.[captureRejectionSymbol]` - -#### Defined in - -node_modules/@types/node/events.d.ts:136 - ---- - -### addListener() - -> **addListener**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.on(eventName, listener)`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.addListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:597 - ---- - -### cacheTweet() - -> **cacheTweet**(`tweet`): `Promise`\<`void`\> - -#### Parameters - -• **tweet**: `Tweet` - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.cacheTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:99](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L99) - ---- - -### emit() - -> **emit**\<`K`\>(`eventName`, ...`args`): `boolean` - -Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments -to each. - -Returns `true` if the event had listeners, `false` otherwise. - -```js -import { EventEmitter } from "node:events"; -const myEmitter = new EventEmitter(); - -// First listener -myEmitter.on("event", function firstListener() { - console.log("Helloooo! first listener"); -}); -// Second listener -myEmitter.on("event", function secondListener(arg1, arg2) { - console.log(`event with parameters ${arg1}, ${arg2} in second listener`); -}); -// Third listener -myEmitter.on("event", function thirdListener(...args) { - const parameters = args.join(", "); - console.log(`event with parameters ${parameters} in third listener`); -}); - -console.log(myEmitter.listeners("event")); - -myEmitter.emit("event", 1, 2, 3, 4, 5); - -// Prints: -// [ -// [Function: firstListener], -// [Function: secondListener], -// [Function: thirdListener] -// ] -// Helloooo! first listener -// event with parameters 1, 2 in second listener -// event with parameters 1, 2, 3, 4, 5 in third listener -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• ...**args**: `AnyRest` - -#### Returns - -`boolean` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.emit` - -#### Defined in - -node_modules/@types/node/events.d.ts:859 - ---- - -### eventNames() - -> **eventNames**(): (`string` \| `symbol`)[] - -Returns an array listing the events for which the emitter has registered -listeners. The values in the array are strings or `Symbol`s. - -```js -import { EventEmitter } from "node:events"; - -const myEE = new EventEmitter(); -myEE.on("foo", () => {}); -myEE.on("bar", () => {}); - -const sym = Symbol("symbol"); -myEE.on(sym, () => {}); - -console.log(myEE.eventNames()); -// Prints: [ 'foo', 'bar', Symbol(symbol) ] -``` - -#### Returns - -(`string` \| `symbol`)[] - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.eventNames` - -#### Defined in - -node_modules/@types/node/events.d.ts:922 - ---- - -### fetchHomeTimeline() - -> **fetchHomeTimeline**(`count`): `Promise`\<`Tweet`[]\> - -#### Parameters - -• **count**: `number` - -#### Returns - -`Promise`\<`Tweet`[]\> - -#### Inherited from - -`ClientBase.fetchHomeTimeline` - -#### Defined in - -[core/src/clients/twitter/base.ts:278](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L278) - ---- - -### fetchSearchTweets() - -> **fetchSearchTweets**(`query`, `maxTweets`, `searchMode`, `cursor`?): `Promise`\<`QueryTweetsResponse`\> - -#### Parameters - -• **query**: `string` - -• **maxTweets**: `number` - -• **searchMode**: `SearchMode` - -• **cursor?**: `string` - -#### Returns - -`Promise`\<`QueryTweetsResponse`\> - -#### Inherited from - -`ClientBase.fetchSearchTweets` - -#### Defined in - -[core/src/clients/twitter/base.ts:330](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L330) - ---- - -### getCachedTweet() - -> **getCachedTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getCachedTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:115](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L115) - ---- - -### getMaxListeners() - -> **getMaxListeners**(): `number` - -Returns the current max listener value for the `EventEmitter` which is either -set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](TwitterSearchClient.md#defaultmaxlisteners). - -#### Returns - -`number` - -#### Since - -v1.0.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:774 - ---- - -### getTweet() - -> **getTweet**(`tweetId`): `Promise`\<`Tweet`\> - -#### Parameters - -• **tweetId**: `string` - -#### Returns - -`Promise`\<`Tweet`\> - -#### Inherited from - -`ClientBase.getTweet` - -#### Defined in - -[core/src/clients/twitter/base.ts:137](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L137) - ---- - -### listenerCount() - -> **listenerCount**\<`K`\>(`eventName`, `listener`?): `number` - -Returns the number of listeners listening for the event named `eventName`. -If `listener` is provided, it will return how many times the listener is found -in the list of the listeners of the event. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event being listened for - -• **listener?**: `Function` - -The event handler function - -#### Returns - -`number` - -#### Since - -v3.2.0 - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:868 - ---- - -### listeners() - -> **listeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -console.log(util.inspect(server.listeners("connection"))); -// Prints: [ [Function] ] -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.listeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:787 - ---- - -### off() - -> **off**\<`K`\>(`eventName`, `listener`): `this` - -Alias for `emitter.removeListener()`. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v10.0.0 - -#### Inherited from - -`ClientBase.off` - -#### Defined in - -node_modules/@types/node/events.d.ts:747 - ---- - -### on() - -> **on**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the end of the listeners array for the event -named `eventName`. No checks are made to see if the `listener` has already -been added. Multiple calls passing the same combination of `eventName` and -`listener` will result in the `listener` being added, and called, multiple times. - -```js -server.on("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.on("foo", () => console.log("a")); -myEE.prependListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.1.101 - -#### Inherited from - -`ClientBase.on` - -#### Defined in - -node_modules/@types/node/events.d.ts:629 - ---- - -### once() - -> **once**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time** `listener` function for the event named `eventName`. The -next time `eventName` is triggered, this listener is removed and then invoked. - -```js -server.once("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the -event listener to the beginning of the listeners array. - -```js -import { EventEmitter } from "node:events"; -const myEE = new EventEmitter(); -myEE.once("foo", () => console.log("a")); -myEE.prependOnceListener("foo", () => console.log("b")); -myEE.emit("foo"); -// Prints: -// b -// a -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v0.3.0 - -#### Inherited from - -`ClientBase.once` - -#### Defined in - -node_modules/@types/node/events.d.ts:659 - ---- - -### onReady() - -> **onReady**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -`ClientBase.onReady` - -#### Defined in - -[core/src/clients/twitter/search.ts:60](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/search.ts#L60) - ---- - -### prependListener() - -> **prependListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds the `listener` function to the _beginning_ of the listeners array for the -event named `eventName`. No checks are made to see if the `listener` has -already been added. Multiple calls passing the same combination of `eventName` -and `listener` will result in the `listener` being added, and called, multiple times. - -```js -server.prependListener("connection", (stream) => { - console.log("someone connected!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:886 - ---- - -### prependOnceListener() - -> **prependOnceListener**\<`K`\>(`eventName`, `listener`): `this` - -Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this -listener is removed, and then invoked. - -```js -server.prependOnceListener("connection", (stream) => { - console.log("Ah, we have our first user!"); -}); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -The name of the event. - -• **listener** - -The callback function - -#### Returns - -`this` - -#### Since - -v6.0.0 - -#### Inherited from - -`ClientBase.prependOnceListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:902 - ---- - -### rawListeners() - -> **rawListeners**\<`K`\>(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`, -including any wrappers (such as those created by `.once()`). - -```js -import { EventEmitter } from "node:events"; -const emitter = new EventEmitter(); -emitter.once("log", () => console.log("log once")); - -// Returns a new Array with a function `onceWrapper` which has a property -// `listener` which contains the original listener bound above -const listeners = emitter.rawListeners("log"); -const logFnWrapper = listeners[0]; - -// Logs "log once" to the console and does not unbind the `once` event -logFnWrapper.listener(); - -// Logs "log once" to the console and removes the listener -logFnWrapper(); - -emitter.on("log", () => console.log("log persistently")); -// Will return a new Array with a single function bound by `.on()` above -const newListeners = emitter.rawListeners("log"); - -// Logs "log persistently" twice -newListeners[0](); -emitter.emit("log"); -``` - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v9.4.0 - -#### Inherited from - -`ClientBase.rawListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:818 - ---- - -### removeAllListeners() - -> **removeAllListeners**(`eventName`?): `this` - -Removes all listeners, or those of the specified `eventName`. - -It is bad practice to remove listeners added elsewhere in the code, -particularly when the `EventEmitter` instance was created by some other -component or module (e.g. sockets or file streams). - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **eventName?**: `string` \| `symbol` - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeAllListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:758 - ---- - -### removeListener() - -> **removeListener**\<`K`\>(`eventName`, `listener`): `this` - -Removes the specified `listener` from the listener array for the event named `eventName`. - -```js -const callback = (stream) => { - console.log("someone connected!"); -}; -server.on("connection", callback); -// ... -server.removeListener("connection", callback); -``` - -`removeListener()` will remove, at most, one instance of a listener from the -listener array. If any single listener has been added multiple times to the -listener array for the specified `eventName`, then `removeListener()` must be -called multiple times to remove each instance. - -Once an event is emitted, all listeners attached to it at the -time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution -will not remove them from`emit()` in progress. Subsequent events behave as expected. - -```js -import { EventEmitter } from "node:events"; -class MyEmitter extends EventEmitter {} -const myEmitter = new MyEmitter(); - -const callbackA = () => { - console.log("A"); - myEmitter.removeListener("event", callbackB); -}; - -const callbackB = () => { - console.log("B"); -}; - -myEmitter.on("event", callbackA); - -myEmitter.on("event", callbackB); - -// callbackA removes listener callbackB but it will still be called. -// Internal listener array at time of emit [callbackA, callbackB] -myEmitter.emit("event"); -// Prints: -// A -// B - -// callbackB is now removed. -// Internal listener array [callbackA] -myEmitter.emit("event"); -// Prints: -// A -``` - -Because listeners are managed using an internal array, calling this will -change the position indices of any listener registered _after_ the listener -being removed. This will not impact the order in which listeners are called, -but it means that any copies of the listener array as returned by -the `emitter.listeners()` method will need to be recreated. - -When a single function has been added as a handler multiple times for a single -event (as in the example below), `removeListener()` will remove the most -recently added instance. In the example the `once('ping')` listener is removed: - -```js -import { EventEmitter } from "node:events"; -const ee = new EventEmitter(); - -function pong() { - console.log("pong"); -} - -ee.on("ping", pong); -ee.once("ping", pong); -ee.removeListener("ping", pong); - -ee.emit("ping"); -ee.emit("ping"); -``` - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Type Parameters - -• **K** - -#### Parameters - -• **eventName**: `string` \| `symbol` - -• **listener** - -#### Returns - -`this` - -#### Since - -v0.1.26 - -#### Inherited from - -`ClientBase.removeListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:742 - ---- - -### saveRequestMessage() - -> **saveRequestMessage**(`message`, `state`): `Promise`\<`void`\> - -#### Parameters - -• **message**: [`Memory`](../interfaces/Memory.md) - -• **state**: [`State`](../interfaces/State.md) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.saveRequestMessage` - -#### Defined in - -[core/src/clients/twitter/base.ts:572](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L572) - ---- - -### setCookiesFromArray() - -> **setCookiesFromArray**(`cookiesArray`): `Promise`\<`void`\> - -#### Parameters - -• **cookiesArray**: `any`[] - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -`ClientBase.setCookiesFromArray` - -#### Defined in - -[core/src/clients/twitter/base.ts:560](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/clients/twitter/base.ts#L560) - ---- - -### setMaxListeners() - -> **setMaxListeners**(`n`): `this` - -By default `EventEmitter`s will print a warning if more than `10` listeners are -added for a particular event. This is a useful default that helps finding -memory leaks. The `emitter.setMaxListeners()` method allows the limit to be -modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - -Returns a reference to the `EventEmitter`, so that calls can be chained. - -#### Parameters - -• **n**: `number` - -#### Returns - -`this` - -#### Since - -v0.3.5 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:768 - ---- - -### addAbortListener() - -> `static` **addAbortListener**(`signal`, `resource`): `Disposable` - -**`Experimental`** - -Listens once to the `abort` event on the provided `signal`. - -Listening to the `abort` event on abort signals is unsafe and may -lead to resource leaks since another third party with the signal can -call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change -this since it would violate the web standard. Additionally, the original -API makes it easy to forget to remove listeners. - -This API allows safely using `AbortSignal`s in Node.js APIs by solving these -two issues by listening to the event such that `stopImmediatePropagation` does -not prevent the listener from running. - -Returns a disposable so that it may be unsubscribed from more easily. - -```js -import { addAbortListener } from "node:events"; - -function example(signal) { - let disposable; - try { - signal.addEventListener("abort", (e) => e.stopImmediatePropagation()); - disposable = addAbortListener(signal, (e) => { - // Do something when signal is aborted. - }); - } finally { - disposable?.[Symbol.dispose](); - } -} -``` - -#### Parameters - -• **signal**: `AbortSignal` - -• **resource** - -#### Returns - -`Disposable` - -Disposable that removes the `abort` listener. - -#### Since - -v20.5.0 - -#### Inherited from - -`ClientBase.addAbortListener` - -#### Defined in - -node_modules/@types/node/events.d.ts:437 - ---- - -### getEventListeners() - -> `static` **getEventListeners**(`emitter`, `name`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -For `EventEmitter`s this behaves exactly the same as calling `.listeners` on -the emitter. - -For `EventTarget`s this is the only way to get the event listeners for the -event target. This is useful for debugging and diagnostic purposes. - -```js -import { getEventListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - const listener = () => console.log("Events are fun"); - ee.on("foo", listener); - console.log(getEventListeners(ee, "foo")); // [ [Function: listener] ] -} -{ - const et = new EventTarget(); - const listener = () => console.log("Events are fun"); - et.addEventListener("foo", listener); - console.log(getEventListeners(et, "foo")); // [ [Function: listener] ] -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -• **name**: `string` \| `symbol` - -#### Returns - -`Function`[] - -#### Since - -v15.2.0, v14.17.0 - -#### Inherited from - -`ClientBase.getEventListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:358 - ---- - -### getMaxListeners() - -> `static` **getMaxListeners**(`emitter`): `number` - -Returns the currently set max amount of listeners. - -For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on -the emitter. - -For `EventTarget`s this is the only way to get the max event listeners for the -event target. If the number of event handlers on a single EventTarget exceeds -the max set, the EventTarget will print a warning. - -```js -import { getMaxListeners, setMaxListeners, EventEmitter } from "node:events"; - -{ - const ee = new EventEmitter(); - console.log(getMaxListeners(ee)); // 10 - setMaxListeners(11, ee); - console.log(getMaxListeners(ee)); // 11 -} -{ - const et = new EventTarget(); - console.log(getMaxListeners(et)); // 10 - setMaxListeners(11, et); - console.log(getMaxListeners(et)); // 11 -} -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> \| `EventTarget` - -#### Returns - -`number` - -#### Since - -v19.9.0 - -#### Inherited from - -`ClientBase.getMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:387 - ---- - -### ~~listenerCount()~~ - -> `static` **listenerCount**(`emitter`, `eventName`): `number` - -A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - -```js -import { EventEmitter, listenerCount } from "node:events"; - -const myEmitter = new EventEmitter(); -myEmitter.on("event", () => {}); -myEmitter.on("event", () => {}); -console.log(listenerCount(myEmitter, "event")); -// Prints: 2 -``` - -#### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -The emitter to query - -• **eventName**: `string` \| `symbol` - -The event name - -#### Returns - -`number` - -#### Since - -v0.9.12 - -#### Deprecated - -Since v3.2.0 - Use `listenerCount` instead. - -#### Inherited from - -`ClientBase.listenerCount` - -#### Defined in - -node_modules/@types/node/events.d.ts:330 - ---- - -### on() - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); -}); - -for await (const event of on(ee, "foo")) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] -} -// Unreachable here -``` - -Returns an `AsyncIterator` that iterates `eventName` events. It will throw -if the `EventEmitter` emits `'error'`. It removes all listeners when -exiting the loop. The `value` returned by each iteration is an array -composed of the emitted event arguments. - -An `AbortSignal` can be used to cancel waiting on events: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ac = new AbortController(); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - }); - - for await (const event of on(ee, "foo", { signal: ac.signal })) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); - -process.nextTick(() => ac.abort()); -``` - -Use the `close` option to specify an array of event names that will end the iteration: - -```js -import { on, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -// Emit later on -process.nextTick(() => { - ee.emit("foo", "bar"); - ee.emit("foo", 42); - ee.emit("close"); -}); - -for await (const event of on(ee, "foo", { close: ["close"] })) { - console.log(event); // prints ['bar'] [42] -} -// the loop will exit after 'close' is emitted -console.log("done"); // prints 'done' -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - -##### Since - -v13.6.0, v12.16.0 - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:303 - -#### on(emitter, eventName, options) - -> `static` **on**(`emitter`, `eventName`, `options`?): `AsyncIterator`\<`any`[], `any`, `any`\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterIteratorOptions` - -##### Returns - -`AsyncIterator`\<`any`[], `any`, `any`\> - -##### Inherited from - -`ClientBase.on` - -##### Defined in - -node_modules/@types/node/events.d.ts:308 - ---- - -### once() - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given -event or that is rejected if the `EventEmitter` emits `'error'` while waiting. -The `Promise` will resolve with an array of all the arguments emitted to the -given event. - -This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event -semantics and does not listen to the `'error'` event. - -```js -import { once, EventEmitter } from "node:events"; -import process from "node:process"; - -const ee = new EventEmitter(); - -process.nextTick(() => { - ee.emit("myevent", 42); -}); - -const [value] = await once(ee, "myevent"); -console.log(value); - -const err = new Error("kaboom"); -process.nextTick(() => { - ee.emit("error", err); -}); - -try { - await once(ee, "myevent"); -} catch (err) { - console.error("error happened", err); -} -``` - -The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the -'`error'` event itself, then it is treated as any other kind of event without -special handling: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); - -once(ee, "error") - .then(([err]) => console.log("ok", err.message)) - .catch((err) => console.error("error", err.message)); - -ee.emit("error", new Error("boom")); - -// Prints: ok boom -``` - -An `AbortSignal` can be used to cancel waiting for the event: - -```js -import { EventEmitter, once } from "node:events"; - -const ee = new EventEmitter(); -const ac = new AbortController(); - -async function foo(emitter, event, signal) { - try { - await once(emitter, event, { signal }); - console.log("event emitted!"); - } catch (error) { - if (error.name === "AbortError") { - console.error("Waiting for the event was canceled!"); - } else { - console.error("There was an error", error.message); - } - } -} - -foo(ee, "foo", ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit("foo"); // Prints: Waiting for the event was canceled! -``` - -##### Parameters - -• **emitter**: `EventEmitter`\<`DefaultEventMap`\> - -• **eventName**: `string` \| `symbol` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Since - -v11.13.0, v10.16.0 - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:217 - -#### once(emitter, eventName, options) - -> `static` **once**(`emitter`, `eventName`, `options`?): `Promise`\<`any`[]\> - -##### Parameters - -• **emitter**: `EventTarget` - -• **eventName**: `string` - -• **options?**: `StaticEventEmitterOptions` - -##### Returns - -`Promise`\<`any`[]\> - -##### Inherited from - -`ClientBase.once` - -##### Defined in - -node_modules/@types/node/events.d.ts:222 - ---- - -### setMaxListeners() - -> `static` **setMaxListeners**(`n`?, ...`eventTargets`?): `void` - -```js -import { setMaxListeners, EventEmitter } from "node:events"; - -const target = new EventTarget(); -const emitter = new EventEmitter(); - -setMaxListeners(5, target, emitter); -``` - -#### Parameters - -• **n?**: `number` - -A non-negative number. The maximum number of listeners per `EventTarget` event. - -• ...**eventTargets?**: (`EventEmitter`\<`DefaultEventMap`\> \| `EventTarget`)[] - -Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} -objects. - -#### Returns - -`void` - -#### Since - -v15.4.0 - -#### Inherited from - -`ClientBase.setMaxListeners` - -#### Defined in - -node_modules/@types/node/events.d.ts:402 diff --git a/docs/docs/api/classes/WalletProvider.md b/docs/docs/api/classes/WalletProvider.md deleted file mode 100644 index 7f0284df838..00000000000 --- a/docs/docs/api/classes/WalletProvider.md +++ /dev/null @@ -1,97 +0,0 @@ -# Class: WalletProvider - -## Constructors - -### new WalletProvider() - -> **new WalletProvider**(`connection`, `walletPublicKey`): [`WalletProvider`](WalletProvider.md) - -#### Parameters - -• **connection**: `Connection` - -• **walletPublicKey**: `PublicKey` - -#### Returns - -[`WalletProvider`](WalletProvider.md) - -#### Defined in - -[core/src/providers/wallet.ts:53](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L53) - -## Methods - -### fetchPortfolioValue() - -> **fetchPortfolioValue**(`runtime`): `Promise`\<`WalletPortfolio`\> - -#### Parameters - -• **runtime**: `any` - -#### Returns - -`Promise`\<`WalletPortfolio`\> - -#### Defined in - -[core/src/providers/wallet.ts:105](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L105) - ---- - -### fetchPrices() - -> **fetchPrices**(`runtime`): `Promise`\<`Prices`\> - -#### Parameters - -• **runtime**: `any` - -#### Returns - -`Promise`\<`Prices`\> - -#### Defined in - -[core/src/providers/wallet.ts:150](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L150) - ---- - -### formatPortfolio() - -> **formatPortfolio**(`runtime`, `portfolio`, `prices`): `string` - -#### Parameters - -• **runtime**: `any` - -• **portfolio**: `WalletPortfolio` - -• **prices**: `Prices` - -#### Returns - -`string` - -#### Defined in - -[core/src/providers/wallet.ts:192](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L192) - ---- - -### getFormattedPortfolio() - -> **getFormattedPortfolio**(`runtime`): `Promise`\<`string`\> - -#### Parameters - -• **runtime**: `any` - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[core/src/providers/wallet.ts:229](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L229) diff --git a/docs/docs/api/enumerations/Clients.md b/docs/docs/api/enumerations/Clients.md index 2639b8da956..2f84564ce5b 100644 --- a/docs/docs/api/enumerations/Clients.md +++ b/docs/docs/api/enumerations/Clients.md @@ -8,9 +8,9 @@ #### Defined in -[core/src/core/types.ts:300](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L300) +[packages/core/src/types.ts:322](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L322) ---- +*** ### DISCORD @@ -18,9 +18,9 @@ #### Defined in -[core/src/core/types.ts:299](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L299) +[packages/core/src/types.ts:321](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L321) ---- +*** ### TELEGRAM @@ -28,9 +28,9 @@ #### Defined in -[core/src/core/types.ts:302](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L302) +[packages/core/src/types.ts:324](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L324) ---- +*** ### TWITTER @@ -38,4 +38,4 @@ #### Defined in -[core/src/core/types.ts:301](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L301) +[packages/core/src/types.ts:323](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L323) diff --git a/docs/docs/api/enumerations/GoalStatus.md b/docs/docs/api/enumerations/GoalStatus.md index 3bec50a388d..48a39f2180c 100644 --- a/docs/docs/api/enumerations/GoalStatus.md +++ b/docs/docs/api/enumerations/GoalStatus.md @@ -8,9 +8,9 @@ #### Defined in -[core/src/core/types.ts:58](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L58) +[packages/core/src/types.ts:57](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L57) ---- +*** ### FAILED @@ -18,14 +18,14 @@ #### Defined in -[core/src/core/types.ts:59](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L59) +[packages/core/src/types.ts:58](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L58) ---- +*** -### IN_PROGRESS +### IN\_PROGRESS -> **IN_PROGRESS**: `"IN_PROGRESS"` +> **IN\_PROGRESS**: `"IN_PROGRESS"` #### Defined in -[core/src/core/types.ts:60](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L60) +[packages/core/src/types.ts:59](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L59) diff --git a/docs/docs/api/enumerations/ImageGenModel.md b/docs/docs/api/enumerations/ImageGenModel.md deleted file mode 100644 index e9b366064ba..00000000000 --- a/docs/docs/api/enumerations/ImageGenModel.md +++ /dev/null @@ -1,21 +0,0 @@ -# Enumeration: ImageGenModel - -## Enumeration Members - -### Dalle - -> **Dalle**: `"Dalle"` - -#### Defined in - -[core/src/core/imageGenModels.ts:3](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/imageGenModels.ts#L3) - ---- - -### TogetherAI - -> **TogetherAI**: `"TogetherAI"` - -#### Defined in - -[core/src/core/imageGenModels.ts:2](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/imageGenModels.ts#L2) diff --git a/docs/docs/api/enumerations/ModelClass.md b/docs/docs/api/enumerations/ModelClass.md index ff8b6242396..d5c0c1c0806 100644 --- a/docs/docs/api/enumerations/ModelClass.md +++ b/docs/docs/api/enumerations/ModelClass.md @@ -8,9 +8,19 @@ #### Defined in -[core/src/core/types.ts:79](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L79) +[packages/core/src/types.ts:78](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L78) ---- +*** + +### IMAGE + +> **IMAGE**: `"image"` + +#### Defined in + +[packages/core/src/types.ts:79](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L79) + +*** ### LARGE @@ -18,9 +28,9 @@ #### Defined in -[core/src/core/types.ts:78](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L78) +[packages/core/src/types.ts:77](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L77) ---- +*** ### MEDIUM @@ -28,9 +38,9 @@ #### Defined in -[core/src/core/types.ts:77](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L77) +[packages/core/src/types.ts:76](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L76) ---- +*** ### SMALL @@ -38,4 +48,4 @@ #### Defined in -[core/src/core/types.ts:76](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L76) +[packages/core/src/types.ts:75](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L75) diff --git a/docs/docs/api/enumerations/ModelProvider.md b/docs/docs/api/enumerations/ModelProvider.md deleted file mode 100644 index 8cea253f246..00000000000 --- a/docs/docs/api/enumerations/ModelProvider.md +++ /dev/null @@ -1,101 +0,0 @@ -# Enumeration: ModelProvider - -## Enumeration Members - -### ANTHROPIC - -> **ANTHROPIC**: `"anthropic"` - -#### Defined in - -[core/src/core/types.ts:103](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L103) - ---- - -### CLAUDE_VERTEX - -> **CLAUDE_VERTEX**: `"claude_vertex"` - -#### Defined in - -[core/src/core/types.ts:109](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L109) - ---- - -### GITHUB - -> **GITHUB**: `"GITHUB"` - -#### Defined in - -[core/src/core/types.ts:111](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L111) - ---- - -### GOOGLE - -> **GOOGLE**: `"google"` - -#### Defined in - -[core/src/core/types.ts:108](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L108) - ---- - -### GROK - -> **GROK**: `"grok"` - -#### Defined in - -[core/src/core/types.ts:104](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L104) - ---- - -### GROQ - -> **GROQ**: `"groq"` - -#### Defined in - -[core/src/core/types.ts:105](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L105) - ---- - -### LLAMACLOUD - -> **LLAMACLOUD**: `"llama_cloud"` - -#### Defined in - -[core/src/core/types.ts:106](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L106) - ---- - -### LLAMALOCAL - -> **LLAMALOCAL**: `"llama_local"` - -#### Defined in - -[core/src/core/types.ts:107](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L107) - ---- - -### OPENAI - -> **OPENAI**: `"openai"` - -#### Defined in - -[core/src/core/types.ts:102](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L102) - ---- - -### REDPILL - -> **REDPILL**: `"redpill"` - -#### Defined in - -[core/src/core/types.ts:110](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L110) diff --git a/docs/docs/api/enumerations/ModelProviderName.md b/docs/docs/api/enumerations/ModelProviderName.md new file mode 100644 index 00000000000..461236918f6 --- /dev/null +++ b/docs/docs/api/enumerations/ModelProviderName.md @@ -0,0 +1,111 @@ +# Enumeration: ModelProviderName + +## Enumeration Members + +### ANTHROPIC + +> **ANTHROPIC**: `"anthropic"` + +#### Defined in + +[packages/core/src/types.ts:121](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L121) + +*** + +### CLAUDE\_VERTEX + +> **CLAUDE\_VERTEX**: `"claude_vertex"` + +#### Defined in + +[packages/core/src/types.ts:127](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L127) + +*** + +### GOOGLE + +> **GOOGLE**: `"google"` + +#### Defined in + +[packages/core/src/types.ts:126](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L126) + +*** + +### GROK + +> **GROK**: `"grok"` + +#### Defined in + +[packages/core/src/types.ts:122](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L122) + +*** + +### GROQ + +> **GROQ**: `"groq"` + +#### Defined in + +[packages/core/src/types.ts:123](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L123) + +*** + +### LLAMACLOUD + +> **LLAMACLOUD**: `"llama_cloud"` + +#### Defined in + +[packages/core/src/types.ts:124](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L124) + +*** + +### LLAMALOCAL + +> **LLAMALOCAL**: `"llama_local"` + +#### Defined in + +[packages/core/src/types.ts:125](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L125) + +*** + +### OLLAMA + +> **OLLAMA**: `"ollama"` + +#### Defined in + +[packages/core/src/types.ts:130](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L130) + +*** + +### OPENAI + +> **OPENAI**: `"openai"` + +#### Defined in + +[packages/core/src/types.ts:120](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L120) + +*** + +### OPENROUTER + +> **OPENROUTER**: `"openrouter"` + +#### Defined in + +[packages/core/src/types.ts:129](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L129) + +*** + +### REDPILL + +> **REDPILL**: `"redpill"` + +#### Defined in + +[packages/core/src/types.ts:128](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L128) diff --git a/docs/docs/api/enumerations/ServiceType.md b/docs/docs/api/enumerations/ServiceType.md new file mode 100644 index 00000000000..786e3ea9e83 --- /dev/null +++ b/docs/docs/api/enumerations/ServiceType.md @@ -0,0 +1,71 @@ +# Enumeration: ServiceType + +## Enumeration Members + +### BROWSER + +> **BROWSER**: `"browser"` + +#### Defined in + +[packages/core/src/types.ts:650](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L650) + +*** + +### IMAGE\_DESCRIPTION + +> **IMAGE\_DESCRIPTION**: `"image_description"` + +#### Defined in + +[packages/core/src/types.ts:646](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L646) + +*** + +### PDF + +> **PDF**: `"pdf"` + +#### Defined in + +[packages/core/src/types.ts:652](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L652) + +*** + +### SPEECH\_GENERATION + +> **SPEECH\_GENERATION**: `"speech_generation"` + +#### Defined in + +[packages/core/src/types.ts:651](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L651) + +*** + +### TEXT\_GENERATION + +> **TEXT\_GENERATION**: `"text_generation"` + +#### Defined in + +[packages/core/src/types.ts:649](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L649) + +*** + +### TRANSCRIPTION + +> **TRANSCRIPTION**: `"transcription"` + +#### Defined in + +[packages/core/src/types.ts:647](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L647) + +*** + +### VIDEO + +> **VIDEO**: `"video"` + +#### Defined in + +[packages/core/src/types.ts:648](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L648) diff --git a/docs/docs/api/functions/addHeader.md b/docs/docs/api/functions/addHeader.md index b93ea9b2445..aa1df516fee 100644 --- a/docs/docs/api/functions/addHeader.md +++ b/docs/docs/api/functions/addHeader.md @@ -37,4 +37,4 @@ const text = addHeader(header, body); ## Defined in -[core/src/core/context.ts:58](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/context.ts#L58) +[packages/core/src/context.ts:58](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/context.ts#L58) diff --git a/docs/docs/api/functions/buyToken.md b/docs/docs/api/functions/buyToken.md deleted file mode 100644 index 98dfb5f0d55..00000000000 --- a/docs/docs/api/functions/buyToken.md +++ /dev/null @@ -1,31 +0,0 @@ -# Function: buyToken() - -> **buyToken**(`__namedParameters`): `Promise`\<`void`\> - -## Parameters - -• **\_\_namedParameters** - -• **\_\_namedParameters.allowOffCurve**: `boolean` - -• **\_\_namedParameters.amount**: `bigint` - -• **\_\_namedParameters.buyer**: `Keypair` - -• **\_\_namedParameters.connection**: `Connection` - -• **\_\_namedParameters.mint**: `PublicKey` - -• **\_\_namedParameters.priorityFee**: `PriorityFee` - -• **\_\_namedParameters.sdk**: `PumpFunSDK` - -• **\_\_namedParameters.slippage**: `string` - -## Returns - -`Promise`\<`void`\> - -## Defined in - -[core/src/actions/pumpfun.ts:119](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L119) diff --git a/docs/docs/api/functions/composeActionExamples.md b/docs/docs/api/functions/composeActionExamples.md index 8ba5371a578..31ed21c4b03 100644 --- a/docs/docs/api/functions/composeActionExamples.md +++ b/docs/docs/api/functions/composeActionExamples.md @@ -23,4 +23,4 @@ A string containing formatted examples of conversations. ## Defined in -[core/src/core/actions.ts:18](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/actions.ts#L18) +[packages/core/src/actions.ts:11](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/actions.ts#L11) diff --git a/docs/docs/api/functions/composeContext.md b/docs/docs/api/functions/composeContext.md index df9064caa56..1f4c332ed62 100644 --- a/docs/docs/api/functions/composeContext.md +++ b/docs/docs/api/functions/composeContext.md @@ -42,4 +42,4 @@ const context = composeContext({ state, template }); ## Defined in -[core/src/core/context.ts:24](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/context.ts#L24) +[packages/core/src/context.ts:24](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/context.ts#L24) diff --git a/docs/docs/api/functions/createAgentRuntime.md b/docs/docs/api/functions/createAgentRuntime.md deleted file mode 100644 index ef33390ee9a..00000000000 --- a/docs/docs/api/functions/createAgentRuntime.md +++ /dev/null @@ -1,21 +0,0 @@ -# Function: createAgentRuntime() - -> **createAgentRuntime**(`character`, `db`, `token`, `configPath`): `Promise`\<[`AgentRuntime`](../classes/AgentRuntime.md)\> - -## Parameters - -• **character**: [`Character`](../type-aliases/Character.md) - -• **db**: `any` - -• **token**: `string` - -• **configPath**: `string` = `"./elizaConfig.yaml"` - -## Returns - -`Promise`\<[`AgentRuntime`](../classes/AgentRuntime.md)\> - -## Defined in - -[core/src/cli/index.ts:139](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L139) diff --git a/docs/docs/api/functions/createAndBuyToken.md b/docs/docs/api/functions/createAndBuyToken.md deleted file mode 100644 index 06add699226..00000000000 --- a/docs/docs/api/functions/createAndBuyToken.md +++ /dev/null @@ -1,35 +0,0 @@ -# Function: createAndBuyToken() - -> **createAndBuyToken**(`__namedParameters`): `Promise`\<`void`\> - -## Parameters - -• **\_\_namedParameters** - -• **\_\_namedParameters.allowOffCurve**: `boolean` - -• **\_\_namedParameters.buyAmountSol**: `bigint` - -• **\_\_namedParameters.commitment?**: `"processed"` \| `"confirmed"` \| `"finalized"` \| `"recent"` \| `"single"` \| `"singleGossip"` \| `"root"` \| `"max"` = `"finalized"` - -• **\_\_namedParameters.connection**: `Connection` - -• **\_\_namedParameters.deployer**: `Keypair` - -• **\_\_namedParameters.mint**: `Keypair` - -• **\_\_namedParameters.priorityFee**: `PriorityFee` - -• **\_\_namedParameters.sdk**: `PumpFunSDK` - -• **\_\_namedParameters.slippage**: `string` - -• **\_\_namedParameters.tokenMetadata**: `CreateTokenMetadata` - -## Returns - -`Promise`\<`void`\> - -## Defined in - -[core/src/actions/pumpfun.ts:51](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L51) diff --git a/docs/docs/api/functions/createDirectRuntime.md b/docs/docs/api/functions/createDirectRuntime.md deleted file mode 100644 index 256a9cf0b05..00000000000 --- a/docs/docs/api/functions/createDirectRuntime.md +++ /dev/null @@ -1,21 +0,0 @@ -# Function: createDirectRuntime() - -> **createDirectRuntime**(`character`, `db`, `token`, `configPath`): `Promise`\<[`AgentRuntime`](../classes/AgentRuntime.md)\> - -## Parameters - -• **character**: [`Character`](../type-aliases/Character.md) - -• **db**: `any` - -• **token**: `string` - -• **configPath**: `string` = `"./elizaConfig.yaml"` - -## Returns - -`Promise`\<[`AgentRuntime`](../classes/AgentRuntime.md)\> - -## Defined in - -[core/src/cli/index.ts:174](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L174) diff --git a/docs/docs/api/functions/createGoal.md b/docs/docs/api/functions/createGoal.md index afa2fc3f4f6..28962dd1aaf 100644 --- a/docs/docs/api/functions/createGoal.md +++ b/docs/docs/api/functions/createGoal.md @@ -16,4 +16,4 @@ ## Defined in -[core/src/core/goals.ts:54](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/goals.ts#L54) +[packages/core/src/goals.ts:54](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/goals.ts#L54) diff --git a/docs/docs/api/functions/createRelationship.md b/docs/docs/api/functions/createRelationship.md index 431a17e4a05..944a8ca0679 100644 --- a/docs/docs/api/functions/createRelationship.md +++ b/docs/docs/api/functions/createRelationship.md @@ -18,4 +18,4 @@ ## Defined in -[core/src/core/relationships.ts:3](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/relationships.ts#L3) +[packages/core/src/relationships.ts:3](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/relationships.ts#L3) diff --git a/docs/docs/api/functions/embed.md b/docs/docs/api/functions/embed.md index 9c9492cbc5b..c742d2ab473 100644 --- a/docs/docs/api/functions/embed.md +++ b/docs/docs/api/functions/embed.md @@ -20,4 +20,4 @@ The embedding of the input. ## Defined in -[core/src/core/embedding.ts:9](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/embedding.ts#L9) +[packages/core/src/embedding.ts:88](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/embedding.ts#L88) diff --git a/docs/docs/api/functions/findNearestEnvFile.md b/docs/docs/api/functions/findNearestEnvFile.md new file mode 100644 index 00000000000..dddcc99bfcc --- /dev/null +++ b/docs/docs/api/functions/findNearestEnvFile.md @@ -0,0 +1,22 @@ +# Function: findNearestEnvFile() + +> **findNearestEnvFile**(`startDir`?): `string` + +Recursively searches for a .env file starting from the current directory +and moving up through parent directories + +## Parameters + +• **startDir?**: `string` = `...` + +Starting directory for the search + +## Returns + +`string` + +Path to the nearest .env file or null if not found + +## Defined in + +[packages/core/src/settings.ts:11](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/settings.ts#L11) diff --git a/docs/docs/api/functions/formatActionNames.md b/docs/docs/api/functions/formatActionNames.md index e2b189af443..872a0f42c91 100644 --- a/docs/docs/api/functions/formatActionNames.md +++ b/docs/docs/api/functions/formatActionNames.md @@ -18,4 +18,4 @@ A comma-separated string of action names. ## Defined in -[core/src/core/actions.ts:54](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/actions.ts#L54) +[packages/core/src/actions.ts:47](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/actions.ts#L47) diff --git a/docs/docs/api/functions/formatActions.md b/docs/docs/api/functions/formatActions.md index 9b181d7bb39..cf0a37f5698 100644 --- a/docs/docs/api/functions/formatActions.md +++ b/docs/docs/api/functions/formatActions.md @@ -18,4 +18,4 @@ A detailed string of actions, including names and descriptions. ## Defined in -[core/src/core/actions.ts:66](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/actions.ts#L66) +[packages/core/src/actions.ts:59](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/actions.ts#L59) diff --git a/docs/docs/api/functions/formatActors.md b/docs/docs/api/functions/formatActors.md index 43b2112243e..2f5df3df79b 100644 --- a/docs/docs/api/functions/formatActors.md +++ b/docs/docs/api/functions/formatActors.md @@ -20,4 +20,4 @@ string ## Defined in -[core/src/core/messages.ts:45](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/messages.ts#L45) +[packages/core/src/messages.ts:45](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/messages.ts#L45) diff --git a/docs/docs/api/functions/formatEvaluatorExampleDescriptions.md b/docs/docs/api/functions/formatEvaluatorExampleDescriptions.md index 3c3e677ecf4..5bb4f5914ee 100644 --- a/docs/docs/api/functions/formatEvaluatorExampleDescriptions.md +++ b/docs/docs/api/functions/formatEvaluatorExampleDescriptions.md @@ -18,4 +18,4 @@ A string that summarizes the descriptions for each evaluator example, formatted ## Defined in -[core/src/core/evaluators.ts:114](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L114) +[packages/core/src/evaluators.ts:110](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/evaluators.ts#L110) diff --git a/docs/docs/api/functions/formatEvaluatorExamples.md b/docs/docs/api/functions/formatEvaluatorExamples.md index b0e29b29d8c..99f9a50576d 100644 --- a/docs/docs/api/functions/formatEvaluatorExamples.md +++ b/docs/docs/api/functions/formatEvaluatorExamples.md @@ -18,4 +18,4 @@ A string that presents each evaluator example in a structured format, including ## Defined in -[core/src/core/evaluators.ts:59](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L59) +[packages/core/src/evaluators.ts:55](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/evaluators.ts#L55) diff --git a/docs/docs/api/functions/formatEvaluatorNames.md b/docs/docs/api/functions/formatEvaluatorNames.md index f6786782383..81ccd58e56d 100644 --- a/docs/docs/api/functions/formatEvaluatorNames.md +++ b/docs/docs/api/functions/formatEvaluatorNames.md @@ -18,4 +18,4 @@ A string that concatenates the names of all evaluators, each enclosed in single ## Defined in -[core/src/core/evaluators.ts:34](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L34) +[packages/core/src/evaluators.ts:30](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/evaluators.ts#L30) diff --git a/docs/docs/api/functions/formatEvaluators.md b/docs/docs/api/functions/formatEvaluators.md index bdabc314acf..94c951ac0c2 100644 --- a/docs/docs/api/functions/formatEvaluators.md +++ b/docs/docs/api/functions/formatEvaluators.md @@ -18,4 +18,4 @@ A string that concatenates the name and description of each evaluator, separated ## Defined in -[core/src/core/evaluators.ts:45](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L45) +[packages/core/src/evaluators.ts:41](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/evaluators.ts#L41) diff --git a/docs/docs/api/functions/formatGoalsAsString.md b/docs/docs/api/functions/formatGoalsAsString.md index abf951cbdef..b5dae1184d0 100644 --- a/docs/docs/api/functions/formatGoalsAsString.md +++ b/docs/docs/api/functions/formatGoalsAsString.md @@ -14,4 +14,4 @@ ## Defined in -[core/src/core/goals.ts:29](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/goals.ts#L29) +[packages/core/src/goals.ts:29](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/goals.ts#L29) diff --git a/docs/docs/api/functions/formatMessages.md b/docs/docs/api/functions/formatMessages.md index 7dd245834e5..d9a00b98378 100644 --- a/docs/docs/api/functions/formatMessages.md +++ b/docs/docs/api/functions/formatMessages.md @@ -20,4 +20,4 @@ string ## Defined in -[core/src/core/messages.ts:60](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/messages.ts#L60) +[packages/core/src/messages.ts:60](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/messages.ts#L60) diff --git a/docs/docs/api/functions/formatPosts.md b/docs/docs/api/functions/formatPosts.md index 565fc5d3363..8c2d56e7077 100644 --- a/docs/docs/api/functions/formatPosts.md +++ b/docs/docs/api/functions/formatPosts.md @@ -18,4 +18,4 @@ ## Defined in -[core/src/core/posts.ts:4](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/posts.ts#L4) +[packages/core/src/posts.ts:4](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/posts.ts#L4) diff --git a/docs/docs/api/functions/formatRelationships.md b/docs/docs/api/functions/formatRelationships.md index cd1d8dd7544..c9051b1e1b9 100644 --- a/docs/docs/api/functions/formatRelationships.md +++ b/docs/docs/api/functions/formatRelationships.md @@ -16,4 +16,4 @@ ## Defined in -[core/src/core/relationships.ts:43](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/relationships.ts#L43) +[packages/core/src/relationships.ts:43](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/relationships.ts#L43) diff --git a/docs/docs/api/functions/formatTimestamp.md b/docs/docs/api/functions/formatTimestamp.md index a33b4ceed5c..6adbd988183 100644 --- a/docs/docs/api/functions/formatTimestamp.md +++ b/docs/docs/api/functions/formatTimestamp.md @@ -12,4 +12,4 @@ ## Defined in -[core/src/core/messages.ts:94](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/messages.ts#L94) +[packages/core/src/messages.ts:94](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/messages.ts#L94) diff --git a/docs/docs/api/functions/generateCaption.md b/docs/docs/api/functions/generateCaption.md index 3f9b6eaea67..d6c523b20fd 100644 --- a/docs/docs/api/functions/generateCaption.md +++ b/docs/docs/api/functions/generateCaption.md @@ -24,4 +24,4 @@ ## Defined in -[core/src/actions/imageGenerationUtils.ts:90](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/imageGenerationUtils.ts#L90) +[packages/core/src/generation.ts:734](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L734) diff --git a/docs/docs/api/functions/generateImage.md b/docs/docs/api/functions/generateImage.md index e5b91938b03..4900cca7fa0 100644 --- a/docs/docs/api/functions/generateImage.md +++ b/docs/docs/api/functions/generateImage.md @@ -34,4 +34,4 @@ ## Defined in -[core/src/actions/imageGenerationUtils.ts:8](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/imageGenerationUtils.ts#L8) +[packages/core/src/generation.ts:650](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L650) diff --git a/docs/docs/api/functions/generateMessageResponse.md b/docs/docs/api/functions/generateMessageResponse.md index 90542895ec8..5f9ae1f47d7 100644 --- a/docs/docs/api/functions/generateMessageResponse.md +++ b/docs/docs/api/functions/generateMessageResponse.md @@ -26,4 +26,4 @@ The completed message. ## Defined in -[core/src/core/generation.ts:522](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L522) +[packages/core/src/generation.ts:612](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L612) diff --git a/docs/docs/api/functions/generateObject.md b/docs/docs/api/functions/generateObject.md index 9d1dbf9eea2..b3c684ec266 100644 --- a/docs/docs/api/functions/generateObject.md +++ b/docs/docs/api/functions/generateObject.md @@ -18,4 +18,4 @@ ## Defined in -[core/src/core/generation.ts:438](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L438) +[packages/core/src/generation.ts:528](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L528) diff --git a/docs/docs/api/functions/generateObjectArray.md b/docs/docs/api/functions/generateObjectArray.md index af24589e74d..7ea39cd7859 100644 --- a/docs/docs/api/functions/generateObjectArray.md +++ b/docs/docs/api/functions/generateObjectArray.md @@ -18,4 +18,4 @@ ## Defined in -[core/src/core/generation.ts:474](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L474) +[packages/core/src/generation.ts:564](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L564) diff --git a/docs/docs/api/functions/generateShouldRespond.md b/docs/docs/api/functions/generateShouldRespond.md index 5f73dfa705e..00159770f39 100644 --- a/docs/docs/api/functions/generateShouldRespond.md +++ b/docs/docs/api/functions/generateShouldRespond.md @@ -26,4 +26,4 @@ Promise resolving to "RESPOND", "IGNORE", "STOP" or null ## Defined in -[core/src/core/generation.ts:249](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L249) +[packages/core/src/generation.ts:334](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L334) diff --git a/docs/docs/api/functions/generateText.md b/docs/docs/api/functions/generateText.md index 4c5c6da9974..4822c4f911d 100644 --- a/docs/docs/api/functions/generateText.md +++ b/docs/docs/api/functions/generateText.md @@ -30,4 +30,4 @@ The completed message. ## Defined in -[core/src/core/generation.ts:30](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L30) +[packages/core/src/generation.ts:43](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L43) diff --git a/docs/docs/api/functions/generateTextArray.md b/docs/docs/api/functions/generateTextArray.md index 8aa1618631a..9535e6ff2bc 100644 --- a/docs/docs/api/functions/generateTextArray.md +++ b/docs/docs/api/functions/generateTextArray.md @@ -26,4 +26,4 @@ Promise resolving to an array of strings parsed from the model's response ## Defined in -[core/src/core/generation.ts:402](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L402) +[packages/core/src/generation.ts:492](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L492) diff --git a/docs/docs/api/functions/generateTrueOrFalse.md b/docs/docs/api/functions/generateTrueOrFalse.md index 55a73fb8203..7d967ba4855 100644 --- a/docs/docs/api/functions/generateTrueOrFalse.md +++ b/docs/docs/api/functions/generateTrueOrFalse.md @@ -26,4 +26,4 @@ Promise resolving to a boolean value parsed from the model's response ## Defined in -[core/src/core/generation.ts:350](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L350) +[packages/core/src/generation.ts:436](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L436) diff --git a/docs/docs/api/functions/getActorDetails.md b/docs/docs/api/functions/getActorDetails.md index fd1308e231a..29f6b9051aa 100644 --- a/docs/docs/api/functions/getActorDetails.md +++ b/docs/docs/api/functions/getActorDetails.md @@ -18,4 +18,4 @@ Get details for a list of actors. ## Defined in -[core/src/core/messages.ts:12](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/messages.ts#L12) +[packages/core/src/messages.ts:12](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/messages.ts#L12) diff --git a/docs/docs/api/functions/getEndpoint.md b/docs/docs/api/functions/getEndpoint.md index 80d526b74a8..9256e2ed63d 100644 --- a/docs/docs/api/functions/getEndpoint.md +++ b/docs/docs/api/functions/getEndpoint.md @@ -1,15 +1,15 @@ # Function: getEndpoint() -> **getEndpoint**(`provider`): `any` +> **getEndpoint**(`provider`): `string` ## Parameters -• **provider**: [`ModelProvider`](../enumerations/ModelProvider.md) +• **provider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) ## Returns -`any` +`string` ## Defined in -[core/src/core/models.ts:178](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/models.ts#L178) +[packages/core/src/models.ts:226](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/models.ts#L226) diff --git a/docs/docs/api/functions/getGoals.md b/docs/docs/api/functions/getGoals.md index 145fbd9bed4..00070bcea55 100644 --- a/docs/docs/api/functions/getGoals.md +++ b/docs/docs/api/functions/getGoals.md @@ -22,4 +22,4 @@ ## Defined in -[core/src/core/goals.ts:8](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/goals.ts#L8) +[packages/core/src/goals.ts:8](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/goals.ts#L8) diff --git a/docs/docs/api/functions/getImageGenModel.md b/docs/docs/api/functions/getImageGenModel.md deleted file mode 100644 index cb905f53167..00000000000 --- a/docs/docs/api/functions/getImageGenModel.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: getImageGenModel() - -> **getImageGenModel**(`model`): `object` \| `object` - -## Parameters - -• **model**: [`ImageGenModel`](../enumerations/ImageGenModel.md) - -## Returns - -`object` \| `object` - -## Defined in - -[core/src/core/imageGenModels.ts:17](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/imageGenModels.ts#L17) diff --git a/docs/docs/api/functions/getModel.md b/docs/docs/api/functions/getModel.md index 9c980265b4e..e1cd7741476 100644 --- a/docs/docs/api/functions/getModel.md +++ b/docs/docs/api/functions/getModel.md @@ -1,17 +1,17 @@ # Function: getModel() -> **getModel**(`provider`, `type`): `any` +> **getModel**(`provider`, `type`): `string` ## Parameters -• **provider**: [`ModelProvider`](../enumerations/ModelProvider.md) +• **provider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) • **type**: [`ModelClass`](../enumerations/ModelClass.md) ## Returns -`any` +`string` ## Defined in -[core/src/core/models.ts:174](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/models.ts#L174) +[packages/core/src/models.ts:222](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/models.ts#L222) diff --git a/docs/docs/api/functions/getProviders.md b/docs/docs/api/functions/getProviders.md index ae5e5b56b6b..51868fa096d 100644 --- a/docs/docs/api/functions/getProviders.md +++ b/docs/docs/api/functions/getProviders.md @@ -26,4 +26,4 @@ A string that concatenates the outputs of each provider. ## Defined in -[core/src/core/providers.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/providers.ts#L13) +[packages/core/src/providers.ts:10](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/providers.ts#L10) diff --git a/docs/docs/api/functions/getRelationship.md b/docs/docs/api/functions/getRelationship.md index 53db6c21ee6..48fd452b11f 100644 --- a/docs/docs/api/functions/getRelationship.md +++ b/docs/docs/api/functions/getRelationship.md @@ -18,4 +18,4 @@ ## Defined in -[core/src/core/relationships.ts:18](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/relationships.ts#L18) +[packages/core/src/relationships.ts:18](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/relationships.ts#L18) diff --git a/docs/docs/api/functions/getRelationships.md b/docs/docs/api/functions/getRelationships.md index c4b451730c6..dd2f41f6ad5 100644 --- a/docs/docs/api/functions/getRelationships.md +++ b/docs/docs/api/functions/getRelationships.md @@ -16,4 +16,4 @@ ## Defined in -[core/src/core/relationships.ts:33](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/relationships.ts#L33) +[packages/core/src/relationships.ts:33](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/relationships.ts#L33) diff --git a/docs/docs/api/functions/getTokenForProvider.md b/docs/docs/api/functions/getTokenForProvider.md deleted file mode 100644 index 0177abf0f69..00000000000 --- a/docs/docs/api/functions/getTokenForProvider.md +++ /dev/null @@ -1,17 +0,0 @@ -# Function: getTokenForProvider() - -> **getTokenForProvider**(`provider`, `character`): `string` - -## Parameters - -• **provider**: [`ModelProvider`](../enumerations/ModelProvider.md) - -• **character**: [`Character`](../type-aliases/Character.md) - -## Returns - -`string` - -## Defined in - -[core/src/cli/index.ts:105](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L105) diff --git a/docs/docs/api/functions/initializeClients.md b/docs/docs/api/functions/initializeClients.md deleted file mode 100644 index 9549c70a104..00000000000 --- a/docs/docs/api/functions/initializeClients.md +++ /dev/null @@ -1,17 +0,0 @@ -# Function: initializeClients() - -> **initializeClients**(`character`, `runtime`): `Promise`\<`any`[]\> - -## Parameters - -• **character**: [`Character`](../type-aliases/Character.md) - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -## Returns - -`Promise`\<`any`[]\> - -## Defined in - -[core/src/cli/index.ts:21](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L21) diff --git a/docs/docs/api/functions/initializeDatabase.md b/docs/docs/api/functions/initializeDatabase.md deleted file mode 100644 index d7d58df27f6..00000000000 --- a/docs/docs/api/functions/initializeDatabase.md +++ /dev/null @@ -1,11 +0,0 @@ -# Function: initializeDatabase() - -> **initializeDatabase**(): [`PostgresDatabaseAdapter`](../classes/PostgresDatabaseAdapter.md) \| [`SqliteDatabaseAdapter`](../classes/SqliteDatabaseAdapter.md) - -## Returns - -[`PostgresDatabaseAdapter`](../classes/PostgresDatabaseAdapter.md) \| [`SqliteDatabaseAdapter`](../classes/SqliteDatabaseAdapter.md) - -## Defined in - -[core/src/cli/index.ts:129](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L129) diff --git a/docs/docs/api/functions/isCreateAndBuyContent.md b/docs/docs/api/functions/isCreateAndBuyContent.md deleted file mode 100644 index da8cdbee1a2..00000000000 --- a/docs/docs/api/functions/isCreateAndBuyContent.md +++ /dev/null @@ -1,17 +0,0 @@ -# Function: isCreateAndBuyContent() - -> **isCreateAndBuyContent**(`runtime`, `content`): `content is CreateAndBuyContent` - -## Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -• **content**: `any` - -## Returns - -`content is CreateAndBuyContent` - -## Defined in - -[core/src/actions/pumpfun.ts:33](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L33) diff --git a/docs/docs/api/functions/loadActionConfigs.md b/docs/docs/api/functions/loadActionConfigs.md deleted file mode 100644 index 3348a03d815..00000000000 --- a/docs/docs/api/functions/loadActionConfigs.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: loadActionConfigs() - -> **loadActionConfigs**(`configPath`): `ActionConfig`[] - -## Parameters - -• **configPath**: `string` - -## Returns - -`ActionConfig`[] - -## Defined in - -[core/src/cli/config.ts:15](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/config.ts#L15) diff --git a/docs/docs/api/functions/loadCharacters.md b/docs/docs/api/functions/loadCharacters.md deleted file mode 100644 index 43f4922c042..00000000000 --- a/docs/docs/api/functions/loadCharacters.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: loadCharacters() - -> **loadCharacters**(`charactersArg`): [`Character`](../type-aliases/Character.md)[] - -## Parameters - -• **charactersArg**: `string` - -## Returns - -[`Character`](../type-aliases/Character.md)[] - -## Defined in - -[core/src/cli/index.ts:70](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L70) diff --git a/docs/docs/api/functions/loadCustomActions.md b/docs/docs/api/functions/loadCustomActions.md deleted file mode 100644 index c1d81f66a46..00000000000 --- a/docs/docs/api/functions/loadCustomActions.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: loadCustomActions() - -> **loadCustomActions**(`actionConfigs`): `Promise`\<[`Action`](../interfaces/Action.md)[]\> - -## Parameters - -• **actionConfigs**: `ActionConfig`[] - -## Returns - -`Promise`\<[`Action`](../interfaces/Action.md)[]\> - -## Defined in - -[core/src/cli/config.ts:26](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/config.ts#L26) diff --git a/docs/docs/api/functions/loadEnvConfig.md b/docs/docs/api/functions/loadEnvConfig.md new file mode 100644 index 00000000000..e35a0abe670 --- /dev/null +++ b/docs/docs/api/functions/loadEnvConfig.md @@ -0,0 +1,19 @@ +# Function: loadEnvConfig() + +> **loadEnvConfig**(): `ProcessEnv` + +Loads environment variables from the nearest .env file + +## Returns + +`ProcessEnv` + +Environment variables object + +## Throws + +If no .env file is found + +## Defined in + +[packages/core/src/settings.ts:36](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/settings.ts#L36) diff --git a/docs/docs/api/functions/parseArguments.md b/docs/docs/api/functions/parseArguments.md deleted file mode 100644 index b70bd97354a..00000000000 --- a/docs/docs/api/functions/parseArguments.md +++ /dev/null @@ -1,11 +0,0 @@ -# Function: parseArguments() - -> **parseArguments**(): `Arguments` - -## Returns - -`Arguments` - -## Defined in - -[core/src/cli/index.ts:46](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L46) diff --git a/docs/docs/api/functions/retrieveCachedEmbedding.md b/docs/docs/api/functions/retrieveCachedEmbedding.md index 31922d1ebcb..ae1ad555ee7 100644 --- a/docs/docs/api/functions/retrieveCachedEmbedding.md +++ b/docs/docs/api/functions/retrieveCachedEmbedding.md @@ -14,4 +14,4 @@ ## Defined in -[core/src/core/embedding.ts:65](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/embedding.ts#L65) +[packages/core/src/embedding.ts:146](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/embedding.ts#L146) diff --git a/docs/docs/api/functions/sellToken.md b/docs/docs/api/functions/sellToken.md deleted file mode 100644 index c275a4ae4ed..00000000000 --- a/docs/docs/api/functions/sellToken.md +++ /dev/null @@ -1,31 +0,0 @@ -# Function: sellToken() - -> **sellToken**(`__namedParameters`): `Promise`\<`void`\> - -## Parameters - -• **\_\_namedParameters** - -• **\_\_namedParameters.allowOffCurve**: `boolean` - -• **\_\_namedParameters.amount**: `bigint` - -• **\_\_namedParameters.connection**: `Connection` - -• **\_\_namedParameters.mint**: `PublicKey` - -• **\_\_namedParameters.priorityFee**: `PriorityFee` - -• **\_\_namedParameters.sdk**: `PumpFunSDK` - -• **\_\_namedParameters.seller**: `Keypair` - -• **\_\_namedParameters.slippage**: `string` - -## Returns - -`Promise`\<`void`\> - -## Defined in - -[core/src/actions/pumpfun.ts:167](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L167) diff --git a/docs/docs/api/functions/splitChunks.md b/docs/docs/api/functions/splitChunks.md index 7e8758b5330..9c40b2686ba 100644 --- a/docs/docs/api/functions/splitChunks.md +++ b/docs/docs/api/functions/splitChunks.md @@ -1,13 +1,11 @@ # Function: splitChunks() -> **splitChunks**(`runtime`, `content`, `chunkSize`, `bleed`, `modelClass`): `Promise`\<`string`[]\> +> **splitChunks**(`content`, `chunkSize`, `bleed`): `Promise`\<`string`[]\> Splits content into chunks of specified size with optional overlapping bleed sections ## Parameters -• **runtime**: `any` - • **content**: `string` The text content to split into chunks @@ -20,8 +18,6 @@ The maximum size of each chunk in tokens Number of characters to overlap between chunks (default: 100) -• **modelClass**: `string` - ## Returns `Promise`\<`string`[]\> @@ -30,4 +26,4 @@ Promise resolving to array of text chunks with bleed sections ## Defined in -[core/src/core/generation.ts:302](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L302) +[packages/core/src/generation.ts:390](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L390) diff --git a/docs/docs/api/functions/startDiscord.md b/docs/docs/api/functions/startDiscord.md deleted file mode 100644 index 1c46e116f36..00000000000 --- a/docs/docs/api/functions/startDiscord.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: startDiscord() - -> **startDiscord**(`runtime`): [`DiscordClient`](../classes/DiscordClient.md) - -## Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -## Returns - -[`DiscordClient`](../classes/DiscordClient.md) - -## Defined in - -[core/src/cli/index.ts:211](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L211) diff --git a/docs/docs/api/functions/startTelegram.md b/docs/docs/api/functions/startTelegram.md deleted file mode 100644 index f70aa9fbab3..00000000000 --- a/docs/docs/api/functions/startTelegram.md +++ /dev/null @@ -1,17 +0,0 @@ -# Function: startTelegram() - -> **startTelegram**(`runtime`, `character`): `Promise`\<[`TelegramClient`](../classes/TelegramClient.md)\> - -## Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -• **character**: [`Character`](../type-aliases/Character.md) - -## Returns - -`Promise`\<[`TelegramClient`](../classes/TelegramClient.md)\> - -## Defined in - -[core/src/cli/index.ts:215](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L215) diff --git a/docs/docs/api/functions/startTwitter.md b/docs/docs/api/functions/startTwitter.md deleted file mode 100644 index ab9859190da..00000000000 --- a/docs/docs/api/functions/startTwitter.md +++ /dev/null @@ -1,15 +0,0 @@ -# Function: startTwitter() - -> **startTwitter**(`runtime`): `Promise`\<([`TwitterPostClient`](../classes/TwitterPostClient.md) \| [`TwitterInteractionClient`](../classes/TwitterInteractionClient.md) \| [`TwitterSearchClient`](../classes/TwitterSearchClient.md))[]\> - -## Parameters - -• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) - -## Returns - -`Promise`\<([`TwitterPostClient`](../classes/TwitterPostClient.md) \| [`TwitterInteractionClient`](../classes/TwitterInteractionClient.md) \| [`TwitterSearchClient`](../classes/TwitterSearchClient.md))[]\> - -## Defined in - -[core/src/cli/index.ts:245](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/cli/index.ts#L245) diff --git a/docs/docs/api/functions/trimTokens.md b/docs/docs/api/functions/trimTokens.md index b42f5b16712..251a92dc9d8 100644 --- a/docs/docs/api/functions/trimTokens.md +++ b/docs/docs/api/functions/trimTokens.md @@ -22,4 +22,4 @@ The model to use for generateText. ## Defined in -[core/src/core/generation.ts:223](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/generation.ts#L223) +[packages/core/src/generation.ts:308](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/generation.ts#L308) diff --git a/docs/docs/api/functions/updateGoal.md b/docs/docs/api/functions/updateGoal.md index b4150ab70ff..d2d93fe87f8 100644 --- a/docs/docs/api/functions/updateGoal.md +++ b/docs/docs/api/functions/updateGoal.md @@ -16,4 +16,4 @@ ## Defined in -[core/src/core/goals.ts:44](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/goals.ts#L44) +[packages/core/src/goals.ts:44](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/goals.ts#L44) diff --git a/docs/docs/api/globals.md b/docs/docs/api/globals.md index c01b63de249..016a5729a62 100644 --- a/docs/docs/api/globals.md +++ b/docs/docs/api/globals.md @@ -1,28 +1,19 @@ -# @eliza/core +# @ai16z/eliza ## Enumerations - [Clients](enumerations/Clients.md) - [GoalStatus](enumerations/GoalStatus.md) -- [ImageGenModel](enumerations/ImageGenModel.md) - [ModelClass](enumerations/ModelClass.md) -- [ModelProvider](enumerations/ModelProvider.md) +- [ModelProviderName](enumerations/ModelProviderName.md) +- [ServiceType](enumerations/ServiceType.md) ## Classes - [AgentRuntime](classes/AgentRuntime.md) - [DatabaseAdapter](classes/DatabaseAdapter.md) -- [DirectClient](classes/DirectClient.md) -- [DiscordClient](classes/DiscordClient.md) - [MemoryManager](classes/MemoryManager.md) -- [PostgresDatabaseAdapter](classes/PostgresDatabaseAdapter.md) -- [SqliteDatabaseAdapter](classes/SqliteDatabaseAdapter.md) -- [TelegramClient](classes/TelegramClient.md) -- [TokenProvider](classes/TokenProvider.md) -- [TwitterInteractionClient](classes/TwitterInteractionClient.md) -- [TwitterPostClient](classes/TwitterPostClient.md) -- [TwitterSearchClient](classes/TwitterSearchClient.md) -- [WalletProvider](classes/WalletProvider.md) +- [Service](classes/Service.md) ## Interfaces @@ -32,18 +23,17 @@ - [Actor](interfaces/Actor.md) - [Content](interfaces/Content.md) - [ConversationExample](interfaces/ConversationExample.md) -- [CreateAndBuyContent](interfaces/CreateAndBuyContent.md) - [EvaluationExample](interfaces/EvaluationExample.md) - [Evaluator](interfaces/Evaluator.md) - [Goal](interfaces/Goal.md) - [IAgentRuntime](interfaces/IAgentRuntime.md) - [IBrowserService](interfaces/IBrowserService.md) - [IDatabaseAdapter](interfaces/IDatabaseAdapter.md) -- [IImageRecognitionService](interfaces/IImageRecognitionService.md) -- [ILlamaService](interfaces/ILlamaService.md) +- [IImageDescriptionService](interfaces/IImageDescriptionService.md) - [IMemoryManager](interfaces/IMemoryManager.md) - [IPdfService](interfaces/IPdfService.md) - [ISpeechService](interfaces/ISpeechService.md) +- [ITextGenerationService](interfaces/ITextGenerationService.md) - [ITranscriptionService](interfaces/ITranscriptionService.md) - [IVideoService](interfaces/IVideoService.md) - [Memory](interfaces/Memory.md) @@ -58,57 +48,34 @@ ## Type Aliases - [Character](type-aliases/Character.md) +- [Client](type-aliases/Client.md) - [Handler](type-aliases/Handler.md) - [HandlerCallback](type-aliases/HandlerCallback.md) - [Media](type-aliases/Media.md) - [Model](type-aliases/Model.md) +- [Models](type-aliases/Models.md) - [Plugin](type-aliases/Plugin.md) - [UUID](type-aliases/UUID.md) - [Validator](type-aliases/Validator.md) ## Variables -- [boredomProvider](variables/boredomProvider.md) -- [continueAction](variables/continueAction.md) -- [defaultActions](variables/defaultActions.md) - [defaultCharacter](variables/defaultCharacter.md) -- [defaultEvaluators](variables/defaultEvaluators.md) -- [defaultProviders](variables/defaultProviders.md) - [elizaLogger](variables/elizaLogger.md) - [embeddingDimension](variables/embeddingDimension.md) - [embeddingZeroVector](variables/embeddingZeroVector.md) - [evaluationTemplate](variables/evaluationTemplate.md) -- [executeSwap](variables/executeSwap.md) -- [followRoom](variables/followRoom.md) -- [ignore](variables/ignore.md) -- [imageGeneration](variables/imageGeneration.md) -- [imageGenModels](variables/imageGenModels.md) -- [messageHandlerTemplate](variables/messageHandlerTemplate.md) -- [muteRoom](variables/muteRoom.md) -- [none](variables/none.md) -- [orderBookProvider](variables/orderBookProvider.md) -- [shouldContinueTemplate](variables/shouldContinueTemplate.md) -- [shouldFollowTemplate](variables/shouldFollowTemplate.md) -- [shouldMuteTemplate](variables/shouldMuteTemplate.md) -- [shouldUnmuteTemplate](variables/shouldUnmuteTemplate.md) -- [timeProvider](variables/timeProvider.md) -- [tokenProvider](variables/tokenProvider.md) -- [unfollowRoom](variables/unfollowRoom.md) -- [unmuteRoom](variables/unmuteRoom.md) -- [walletProvider](variables/walletProvider.md) +- [settings](variables/settings.md) ## Functions - [addHeader](functions/addHeader.md) -- [buyToken](functions/buyToken.md) - [composeActionExamples](functions/composeActionExamples.md) - [composeContext](functions/composeContext.md) -- [createAgentRuntime](functions/createAgentRuntime.md) -- [createAndBuyToken](functions/createAndBuyToken.md) -- [createDirectRuntime](functions/createDirectRuntime.md) - [createGoal](functions/createGoal.md) - [createRelationship](functions/createRelationship.md) - [embed](functions/embed.md) +- [findNearestEnvFile](functions/findNearestEnvFile.md) - [formatActionNames](functions/formatActionNames.md) - [formatActions](functions/formatActions.md) - [formatActors](functions/formatActors.md) @@ -133,24 +100,12 @@ - [getActorDetails](functions/getActorDetails.md) - [getEndpoint](functions/getEndpoint.md) - [getGoals](functions/getGoals.md) -- [getImageGenModel](functions/getImageGenModel.md) - [getModel](functions/getModel.md) - [getProviders](functions/getProviders.md) - [getRelationship](functions/getRelationship.md) - [getRelationships](functions/getRelationships.md) -- [getTokenForProvider](functions/getTokenForProvider.md) -- [initializeClients](functions/initializeClients.md) -- [initializeDatabase](functions/initializeDatabase.md) -- [isCreateAndBuyContent](functions/isCreateAndBuyContent.md) -- [loadActionConfigs](functions/loadActionConfigs.md) -- [loadCharacters](functions/loadCharacters.md) -- [loadCustomActions](functions/loadCustomActions.md) -- [parseArguments](functions/parseArguments.md) +- [loadEnvConfig](functions/loadEnvConfig.md) - [retrieveCachedEmbedding](functions/retrieveCachedEmbedding.md) -- [sellToken](functions/sellToken.md) - [splitChunks](functions/splitChunks.md) -- [startDiscord](functions/startDiscord.md) -- [startTelegram](functions/startTelegram.md) -- [startTwitter](functions/startTwitter.md) - [trimTokens](functions/trimTokens.md) - [updateGoal](functions/updateGoal.md) diff --git a/docs/docs/api/index.md b/docs/docs/api/index.md index 277dac78164..19f4da9ef25 100644 --- a/docs/docs/api/index.md +++ b/docs/docs/api/index.md @@ -6,37 +6,38 @@ ## Features -- 🛠 Full-featured Discord, Twitter and Telegram connectors -- 👥 Multi-agent and room support -- 📚 Easily ingest and interact with your documents -- 💾 Retrievable memory and document store -- 🚀 Highly extensible - create your own actions and clients to extend capabilities -- ☁️ Supports many models, including local Llama, OpenAI, Anthropic, Groq, and more -- 📦 Just works! +- 🛠 Full-featured Discord, Twitter and Telegram connectors +- 👥 Multi-agent and room support +- 📚 Easily ingest and interact with your documents +- 💾 Retrievable memory and document store +- 🚀 Highly extensible - create your own actions and clients to extend capabilities +- ☁️ Supports many models, including local Llama, OpenAI, Anthropic, Groq, and more +- 📦 Just works! ## What can I use it for? -- 🤖 Chatbots -- 🕵️ Autonomous Agents -- 📈 Business process handling -- 🎮 Video game NPCs +- 🤖 Chatbots +- 🕵️ Autonomous Agents +- 📈 Business process handling +- 🎮 Video game NPCs # Getting Started **Prerequisites (MUST):** - -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -- [pnpm](https://pnpm.io/installation) + +- [Python 2.7+](https://www.python.org/downloads/) +- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [pnpm](https://pnpm.io/installation) ### Edit the .env file -- Copy .env.example to .env and fill in the appropriate values -- Edit the TWITTER environment variables to add your bot's username and password +- Copy .env.example to .env and fill in the appropriate values +- Edit the TWITTER environment variables to add your bot's username and password ### Edit the character file -- Check out the file `src/core/defaultCharacter.ts` - you can modify this -- You can also load characters with the `pnpm start --characters="path/to/your/character.json"` and run multiple bots at the same time. +- Check out the file `src/core/defaultCharacter.ts` - you can modify this +- You can also load characters with the `pnpm start --characters="path/to/your/character.json"` and run multiple bots at the same time. After setting up the .env file and character file, you can start the bot with the following command: @@ -83,6 +84,7 @@ DISCORD_APPLICATION_ID= DISCORD_API_TOKEN= # Bot token OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk- ELEVENLABS_XI_API_KEY= # API key from elevenlabs +GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key # ELEVENLABS SETTINGS ELEVENLABS_MODEL_ID=eleven_multilingual_v2 @@ -168,9 +170,9 @@ pnpm test:sqljs # Run tests with SQL.js Tests are written using Jest and can be found in `src/**/*.test.ts` files. The test environment is configured to: -- Load environment variables from `.env.test` -- Use a 2-minute timeout for long-running tests -- Support ESM modules -- Run tests in sequence (--runInBand) +- Load environment variables from `.env.test` +- Use a 2-minute timeout for long-running tests +- Support ESM modules +- Run tests in sequence (--runInBand) To create new tests, add a `.test.ts` file adjacent to the code you're testing. diff --git a/docs/docs/api/interfaces/Account.md b/docs/docs/api/interfaces/Account.md index c6022f7c906..95caadf8f8b 100644 --- a/docs/docs/api/interfaces/Account.md +++ b/docs/docs/api/interfaces/Account.md @@ -10,9 +10,9 @@ Represents a user, including their name, details, and a unique identifier. #### Defined in -[core/src/core/types.ts:262](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L262) +[packages/core/src/types.ts:278](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L278) ---- +*** ### details? @@ -20,13 +20,13 @@ Represents a user, including their name, details, and a unique identifier. #### Index Signature -\[`key`: `string`\]: `any` + \[`key`: `string`\]: `any` #### Defined in -[core/src/core/types.ts:260](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L260) +[packages/core/src/types.ts:276](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L276) ---- +*** ### email? @@ -34,9 +34,9 @@ Represents a user, including their name, details, and a unique identifier. #### Defined in -[core/src/core/types.ts:261](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L261) +[packages/core/src/types.ts:277](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L277) ---- +*** ### id @@ -44,9 +44,9 @@ Represents a user, including their name, details, and a unique identifier. #### Defined in -[core/src/core/types.ts:257](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L257) +[packages/core/src/types.ts:273](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L273) ---- +*** ### name @@ -54,9 +54,9 @@ Represents a user, including their name, details, and a unique identifier. #### Defined in -[core/src/core/types.ts:258](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L258) +[packages/core/src/types.ts:274](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L274) ---- +*** ### username @@ -64,4 +64,4 @@ Represents a user, including their name, details, and a unique identifier. #### Defined in -[core/src/core/types.ts:259](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L259) +[packages/core/src/types.ts:275](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L275) diff --git a/docs/docs/api/interfaces/Action.md b/docs/docs/api/interfaces/Action.md index 6e83f718283..32c778c16b6 100644 --- a/docs/docs/api/interfaces/Action.md +++ b/docs/docs/api/interfaces/Action.md @@ -10,9 +10,9 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:201](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L201) +[packages/core/src/types.ts:216](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L216) ---- +*** ### examples @@ -20,9 +20,9 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:202](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L202) +[packages/core/src/types.ts:217](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L217) ---- +*** ### handler @@ -30,9 +30,9 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:203](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L203) +[packages/core/src/types.ts:218](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L218) ---- +*** ### name @@ -40,9 +40,9 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:204](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L204) +[packages/core/src/types.ts:219](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L219) ---- +*** ### similes @@ -50,9 +50,9 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:200](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L200) +[packages/core/src/types.ts:215](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L215) ---- +*** ### validate @@ -60,4 +60,4 @@ Represents an action that the agent can perform, including conditions for its us #### Defined in -[core/src/core/types.ts:205](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L205) +[packages/core/src/types.ts:220](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L220) diff --git a/docs/docs/api/interfaces/ActionExample.md b/docs/docs/api/interfaces/ActionExample.md index 40240f293cd..6f3afb1d736 100644 --- a/docs/docs/api/interfaces/ActionExample.md +++ b/docs/docs/api/interfaces/ActionExample.md @@ -10,9 +10,9 @@ Represents an example of content, typically used for demonstrating or testing pu #### Defined in -[core/src/core/types.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L27) +[packages/core/src/types.ts:26](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L26) ---- +*** ### user @@ -20,4 +20,4 @@ Represents an example of content, typically used for demonstrating or testing pu #### Defined in -[core/src/core/types.ts:26](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L26) +[packages/core/src/types.ts:25](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L25) diff --git a/docs/docs/api/interfaces/Actor.md b/docs/docs/api/interfaces/Actor.md index be771e44ad9..99acfab1930 100644 --- a/docs/docs/api/interfaces/Actor.md +++ b/docs/docs/api/interfaces/Actor.md @@ -22,9 +22,9 @@ Represents an actor in the conversation, which could be a user or the agent itse #### Defined in -[core/src/core/types.ts:44](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L44) +[packages/core/src/types.ts:43](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L43) ---- +*** ### id @@ -32,9 +32,9 @@ Represents an actor in the conversation, which could be a user or the agent itse #### Defined in -[core/src/core/types.ts:45](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L45) +[packages/core/src/types.ts:44](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L44) ---- +*** ### name @@ -42,9 +42,9 @@ Represents an actor in the conversation, which could be a user or the agent itse #### Defined in -[core/src/core/types.ts:42](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L42) +[packages/core/src/types.ts:41](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L41) ---- +*** ### username @@ -52,4 +52,4 @@ Represents an actor in the conversation, which could be a user or the agent itse #### Defined in -[core/src/core/types.ts:43](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L43) +[packages/core/src/types.ts:42](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L42) diff --git a/docs/docs/api/interfaces/Content.md b/docs/docs/api/interfaces/Content.md index c5200d905df..fc01d7fff41 100644 --- a/docs/docs/api/interfaces/Content.md +++ b/docs/docs/api/interfaces/Content.md @@ -2,13 +2,9 @@ Represents the content of a message, including its main text (`content`), any associated action (`action`), and the source of the content (`source`), if applicable. -## Extended by - -- [`CreateAndBuyContent`](CreateAndBuyContent.md) - ## Indexable -\[`key`: `string`\]: `unknown` + \[`key`: `string`\]: `unknown` ## Properties @@ -18,9 +14,9 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:14](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L14) +[packages/core/src/types.ts:13](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L13) ---- +*** ### attachments? @@ -28,9 +24,9 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:18](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L18) +[packages/core/src/types.ts:17](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L17) ---- +*** ### inReplyTo? @@ -38,9 +34,9 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:17](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L17) +[packages/core/src/types.ts:16](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L16) ---- +*** ### source? @@ -48,9 +44,9 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:15](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L15) +[packages/core/src/types.ts:14](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L14) ---- +*** ### text @@ -58,9 +54,9 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L13) +[packages/core/src/types.ts:12](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L12) ---- +*** ### url? @@ -68,4 +64,4 @@ Represents the content of a message, including its main text (`content`), any as #### Defined in -[core/src/core/types.ts:16](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L16) +[packages/core/src/types.ts:15](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L15) diff --git a/docs/docs/api/interfaces/ConversationExample.md b/docs/docs/api/interfaces/ConversationExample.md index a0602491922..770dbbd7e0c 100644 --- a/docs/docs/api/interfaces/ConversationExample.md +++ b/docs/docs/api/interfaces/ConversationExample.md @@ -10,9 +10,9 @@ Represents an example of content, typically used for demonstrating or testing pu #### Defined in -[core/src/core/types.ts:35](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L35) +[packages/core/src/types.ts:34](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L34) ---- +*** ### userId @@ -20,4 +20,4 @@ Represents an example of content, typically used for demonstrating or testing pu #### Defined in -[core/src/core/types.ts:34](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L34) +[packages/core/src/types.ts:33](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L33) diff --git a/docs/docs/api/interfaces/CreateAndBuyContent.md b/docs/docs/api/interfaces/CreateAndBuyContent.md deleted file mode 100644 index fd158d57101..00000000000 --- a/docs/docs/api/interfaces/CreateAndBuyContent.md +++ /dev/null @@ -1,149 +0,0 @@ -# Interface: CreateAndBuyContent - -Represents the content of a message, including its main text (`content`), any associated action (`action`), and the source of the content (`source`), if applicable. - -## Extends - -- [`Content`](Content.md) - -## Properties - -### action? - -> `optional` **action**: `string` - -#### Inherited from - -[`Content`](Content.md).[`action`](Content.md#action) - -#### Defined in - -[core/src/core/types.ts:14](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L14) - ---- - -### allowOffCurve - -> **allowOffCurve**: `boolean` - -#### Defined in - -[core/src/actions/pumpfun.ts:30](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L30) - ---- - -### attachments? - -> `optional` **attachments**: [`Media`](../type-aliases/Media.md)[] - -#### Inherited from - -[`Content`](Content.md).[`attachments`](Content.md#attachments) - -#### Defined in - -[core/src/core/types.ts:18](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L18) - ---- - -### buyAmountSol - -> **buyAmountSol**: `string` \| `number` - -#### Defined in - -[core/src/actions/pumpfun.ts:25](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L25) - ---- - -### deployerPrivateKey - -> **deployerPrivateKey**: `string` - -#### Defined in - -[core/src/actions/pumpfun.ts:23](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L23) - ---- - -### inReplyTo? - -> `optional` **inReplyTo**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` - -#### Inherited from - -[`Content`](Content.md).[`inReplyTo`](Content.md#inreplyto) - -#### Defined in - -[core/src/core/types.ts:17](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L17) - ---- - -### priorityFee - -> **priorityFee**: `object` - -#### unitLimit - -> **unitLimit**: `number` - -#### unitPrice - -> **unitPrice**: `number` - -#### Defined in - -[core/src/actions/pumpfun.ts:26](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L26) - ---- - -### source? - -> `optional` **source**: `string` - -#### Inherited from - -[`Content`](Content.md).[`source`](Content.md#source) - -#### Defined in - -[core/src/core/types.ts:15](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L15) - ---- - -### text - -> **text**: `string` - -#### Inherited from - -[`Content`](Content.md).[`text`](Content.md#text) - -#### Defined in - -[core/src/core/types.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L13) - ---- - -### tokenMetadata - -> **tokenMetadata**: `CreateTokenMetadata` - -#### Defined in - -[core/src/actions/pumpfun.ts:24](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/pumpfun.ts#L24) - ---- - -### url? - -> `optional` **url**: `string` - -#### Inherited from - -[`Content`](Content.md).[`url`](Content.md#url) - -#### Defined in - -[core/src/core/types.ts:16](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L16) diff --git a/docs/docs/api/interfaces/EvaluationExample.md b/docs/docs/api/interfaces/EvaluationExample.md index 0891f664ae5..26e09982fb5 100644 --- a/docs/docs/api/interfaces/EvaluationExample.md +++ b/docs/docs/api/interfaces/EvaluationExample.md @@ -10,9 +10,9 @@ Represents an example for evaluation, including the context, an array of message #### Defined in -[core/src/core/types.ts:212](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L212) +[packages/core/src/types.ts:227](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L227) ---- +*** ### messages @@ -20,9 +20,9 @@ Represents an example for evaluation, including the context, an array of message #### Defined in -[core/src/core/types.ts:213](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L213) +[packages/core/src/types.ts:228](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L228) ---- +*** ### outcome @@ -30,4 +30,4 @@ Represents an example for evaluation, including the context, an array of message #### Defined in -[core/src/core/types.ts:214](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L214) +[packages/core/src/types.ts:229](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L229) diff --git a/docs/docs/api/interfaces/Evaluator.md b/docs/docs/api/interfaces/Evaluator.md index 3596d2b1b3e..f0fb1e9b6ba 100644 --- a/docs/docs/api/interfaces/Evaluator.md +++ b/docs/docs/api/interfaces/Evaluator.md @@ -4,15 +4,25 @@ Represents an evaluator, which is used to assess and guide the agent's responses ## Properties +### alwaysRun? + +> `optional` **alwaysRun**: `boolean` + +#### Defined in + +[packages/core/src/types.ts:236](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L236) + +*** + ### description > **description**: `string` #### Defined in -[core/src/core/types.ts:221](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L221) +[packages/core/src/types.ts:237](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L237) ---- +*** ### examples @@ -20,9 +30,9 @@ Represents an evaluator, which is used to assess and guide the agent's responses #### Defined in -[core/src/core/types.ts:223](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L223) +[packages/core/src/types.ts:239](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L239) ---- +*** ### handler @@ -30,9 +40,9 @@ Represents an evaluator, which is used to assess and guide the agent's responses #### Defined in -[core/src/core/types.ts:224](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L224) +[packages/core/src/types.ts:240](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L240) ---- +*** ### name @@ -40,9 +50,9 @@ Represents an evaluator, which is used to assess and guide the agent's responses #### Defined in -[core/src/core/types.ts:225](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L225) +[packages/core/src/types.ts:241](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L241) ---- +*** ### similes @@ -50,9 +60,9 @@ Represents an evaluator, which is used to assess and guide the agent's responses #### Defined in -[core/src/core/types.ts:222](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L222) +[packages/core/src/types.ts:238](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L238) ---- +*** ### validate @@ -60,4 +70,4 @@ Represents an evaluator, which is used to assess and guide the agent's responses #### Defined in -[core/src/core/types.ts:226](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L226) +[packages/core/src/types.ts:242](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L242) diff --git a/docs/docs/api/interfaces/Goal.md b/docs/docs/api/interfaces/Goal.md index 8aa672768b0..e6706174537 100644 --- a/docs/docs/api/interfaces/Goal.md +++ b/docs/docs/api/interfaces/Goal.md @@ -10,9 +10,9 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:67](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L67) +[packages/core/src/types.ts:66](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L66) ---- +*** ### name @@ -20,9 +20,9 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:70](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L70) +[packages/core/src/types.ts:69](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L69) ---- +*** ### objectives @@ -30,9 +30,9 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:72](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L72) +[packages/core/src/types.ts:71](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L71) ---- +*** ### roomId @@ -40,9 +40,9 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:68](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L68) +[packages/core/src/types.ts:67](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L67) ---- +*** ### status @@ -50,9 +50,9 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:71](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L71) +[packages/core/src/types.ts:70](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L70) ---- +*** ### userId @@ -60,4 +60,4 @@ Represents a goal, which is a higher-level aim composed of one or more objective #### Defined in -[core/src/core/types.ts:69](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L69) +[packages/core/src/types.ts:68](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L68) diff --git a/docs/docs/api/interfaces/IAgentRuntime.md b/docs/docs/api/interfaces/IAgentRuntime.md index 61b5234f98e..007ddb63ac8 100644 --- a/docs/docs/api/interfaces/IAgentRuntime.md +++ b/docs/docs/api/interfaces/IAgentRuntime.md @@ -8,9 +8,9 @@ #### Defined in -[core/src/core/types.ts:494](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L494) +[packages/core/src/types.ts:527](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L527) ---- +*** ### agentId @@ -18,19 +18,9 @@ #### Defined in -[core/src/core/types.ts:486](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L486) +[packages/core/src/types.ts:520](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L520) ---- - -### browserService - -> **browserService**: [`IBrowserService`](IBrowserService.md) - -#### Defined in - -[core/src/core/types.ts:504](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L504) - ---- +*** ### character @@ -38,9 +28,9 @@ #### Defined in -[core/src/core/types.ts:492](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L492) +[packages/core/src/types.ts:525](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L525) ---- +*** ### databaseAdapter @@ -48,9 +38,9 @@ #### Defined in -[core/src/core/types.ts:488](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L488) +[packages/core/src/types.ts:522](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L522) ---- +*** ### descriptionManager @@ -58,49 +48,19 @@ #### Defined in -[core/src/core/types.ts:497](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L497) - ---- - -### factManager - -> **factManager**: [`IMemoryManager`](IMemoryManager.md) - -#### Defined in - -[core/src/core/types.ts:498](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L498) - ---- - -### imageDescriptionService - -> **imageDescriptionService**: [`IImageRecognitionService`](IImageRecognitionService.md) - -#### Defined in - -[core/src/core/types.ts:500](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L500) - ---- - -### imageGenModel - -> **imageGenModel**: [`ImageGenModel`](../enumerations/ImageGenModel.md) - -#### Defined in - -[core/src/core/types.ts:491](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L491) +[packages/core/src/types.ts:531](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L531) ---- +*** -### llamaService +### evaluators -> **llamaService**: [`ILlamaService`](ILlamaService.md) +> **evaluators**: [`Evaluator`](Evaluator.md)[] #### Defined in -[core/src/core/types.ts:503](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L503) +[packages/core/src/types.ts:528](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L528) ---- +*** ### loreManager @@ -108,9 +68,9 @@ #### Defined in -[core/src/core/types.ts:499](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L499) +[packages/core/src/types.ts:532](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L532) ---- +*** ### messageManager @@ -118,29 +78,19 @@ #### Defined in -[core/src/core/types.ts:496](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L496) +[packages/core/src/types.ts:530](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L530) ---- +*** ### modelProvider -> **modelProvider**: [`ModelProvider`](../enumerations/ModelProvider.md) +> **modelProvider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) #### Defined in -[core/src/core/types.ts:490](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L490) +[packages/core/src/types.ts:524](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L524) ---- - -### pdfService - -> **pdfService**: [`IPdfService`](IPdfService.md) - -#### Defined in - -[core/src/core/types.ts:506](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L506) - ---- +*** ### providers @@ -148,9 +98,9 @@ #### Defined in -[core/src/core/types.ts:493](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L493) +[packages/core/src/types.ts:526](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L526) ---- +*** ### serverUrl @@ -158,19 +108,19 @@ #### Defined in -[core/src/core/types.ts:487](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L487) +[packages/core/src/types.ts:521](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L521) ---- +*** -### speechService +### services -> **speechService**: [`ISpeechService`](ISpeechService.md) +> **services**: `Map`\<[`ServiceType`](../enumerations/ServiceType.md), [`Service`](../classes/Service.md)\> #### Defined in -[core/src/core/types.ts:505](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L505) +[packages/core/src/types.ts:534](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L534) ---- +*** ### token @@ -178,27 +128,7 @@ #### Defined in -[core/src/core/types.ts:489](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L489) - ---- - -### transcriptionService - -> **transcriptionService**: [`ITranscriptionService`](ITranscriptionService.md) - -#### Defined in - -[core/src/core/types.ts:501](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L501) - ---- - -### videoService - -> **videoService**: [`IVideoService`](IVideoService.md) - -#### Defined in - -[core/src/core/types.ts:502](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L502) +[packages/core/src/types.ts:523](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L523) ## Methods @@ -218,9 +148,9 @@ #### Defined in -[core/src/core/types.ts:536](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L536) +[packages/core/src/types.ts:575](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L575) ---- +*** ### ensureConnection() @@ -244,9 +174,9 @@ #### Defined in -[core/src/core/types.ts:527](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L527) +[packages/core/src/types.ts:566](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L566) ---- +*** ### ensureParticipantExists() @@ -264,9 +194,9 @@ #### Defined in -[core/src/core/types.ts:519](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L519) +[packages/core/src/types.ts:558](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L558) ---- +*** ### ensureParticipantInRoom() @@ -284,9 +214,9 @@ #### Defined in -[core/src/core/types.ts:534](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L534) +[packages/core/src/types.ts:573](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L573) ---- +*** ### ensureRoomExists() @@ -302,9 +232,9 @@ #### Defined in -[core/src/core/types.ts:535](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L535) +[packages/core/src/types.ts:574](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L574) ---- +*** ### ensureUserExists() @@ -326,13 +256,13 @@ #### Defined in -[core/src/core/types.ts:520](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L520) +[packages/core/src/types.ts:559](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L559) ---- +*** ### evaluate() -> **evaluate**(`message`, `state`?): `Promise`\<`string`[]\> +> **evaluate**(`message`, `state`?, `didRespond`?): `Promise`\<`string`[]\> #### Parameters @@ -340,15 +270,17 @@ • **state?**: [`State`](State.md) +• **didRespond?**: `boolean` + #### Returns `Promise`\<`string`[]\> #### Defined in -[core/src/core/types.ts:518](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L518) +[packages/core/src/types.ts:553](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L553) ---- +*** ### getConversationLength() @@ -360,9 +292,45 @@ #### Defined in -[core/src/core/types.ts:511](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L511) +[packages/core/src/types.ts:546](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L546) + +*** + +### getMemoryManager() + +> **getMemoryManager**(`name`): [`IMemoryManager`](IMemoryManager.md) + +#### Parameters + +• **name**: `string` + +#### Returns + +[`IMemoryManager`](IMemoryManager.md) + +#### Defined in + +[packages/core/src/types.ts:537](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L537) + +*** + +### getService() + +> **getService**(`service`): *typeof* [`Service`](../classes/Service.md) + +#### Parameters + +• **service**: `string` + +#### Returns + +*typeof* [`Service`](../classes/Service.md) + +#### Defined in + +[packages/core/src/types.ts:539](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L539) ---- +*** ### getSetting() @@ -378,9 +346,9 @@ #### Defined in -[core/src/core/types.ts:508](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L508) +[packages/core/src/types.ts:543](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L543) ---- +*** ### processActions() @@ -402,9 +370,9 @@ #### Defined in -[core/src/core/types.ts:512](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L512) +[packages/core/src/types.ts:547](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L547) ---- +*** ### registerAction() @@ -420,9 +388,45 @@ #### Defined in -[core/src/core/types.ts:526](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L526) +[packages/core/src/types.ts:565](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L565) + +*** + +### registerMemoryManager() + +> **registerMemoryManager**(`manager`): `void` + +#### Parameters + +• **manager**: [`IMemoryManager`](IMemoryManager.md) + +#### Returns + +`void` + +#### Defined in + +[packages/core/src/types.ts:535](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L535) + +*** + +### registerService() + +> **registerService**(`service`): `void` + +#### Parameters + +• **service**: [`Service`](../classes/Service.md) + +#### Returns + +`void` + +#### Defined in + +[packages/core/src/types.ts:541](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L541) ---- +*** ### updateRecentMessageState() @@ -438,4 +442,4 @@ #### Defined in -[core/src/core/types.ts:540](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L540) +[packages/core/src/types.ts:579](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L579) diff --git a/docs/docs/api/interfaces/IBrowserService.md b/docs/docs/api/interfaces/IBrowserService.md index 445c72451b4..68b05ceb084 100644 --- a/docs/docs/api/interfaces/IBrowserService.md +++ b/docs/docs/api/interfaces/IBrowserService.md @@ -1,5 +1,9 @@ # Interface: IBrowserService +## Extends + +- [`Service`](../classes/Service.md) + ## Methods ### closeBrowser() @@ -12,18 +16,20 @@ #### Defined in -[core/src/core/types.ts:587](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L587) +[packages/core/src/types.ts:630](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L630) ---- +*** ### getPageContent() -> **getPageContent**(`url`): `Promise`\<`object`\> +> **getPageContent**(`url`, `runtime`): `Promise`\<`object`\> #### Parameters • **url**: `string` +• **runtime**: [`IAgentRuntime`](IAgentRuntime.md) + #### Returns `Promise`\<`object`\> @@ -42,9 +48,9 @@ #### Defined in -[core/src/core/types.ts:588](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L588) +[packages/core/src/types.ts:631](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L631) ---- +*** ### initialize() @@ -56,4 +62,4 @@ #### Defined in -[core/src/core/types.ts:586](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L586) +[packages/core/src/types.ts:629](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L629) diff --git a/docs/docs/api/interfaces/IDatabaseAdapter.md b/docs/docs/api/interfaces/IDatabaseAdapter.md index 76d1544b164..5fd2d8e6ac4 100644 --- a/docs/docs/api/interfaces/IDatabaseAdapter.md +++ b/docs/docs/api/interfaces/IDatabaseAdapter.md @@ -8,7 +8,7 @@ #### Defined in -[core/src/core/types.ts:342](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L342) +[packages/core/src/types.ts:363](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L363) ## Methods @@ -28,9 +28,9 @@ #### Defined in -[core/src/core/types.ts:424](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L424) +[packages/core/src/types.ts:445](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L445) ---- +*** ### countMemories() @@ -50,9 +50,9 @@ #### Defined in -[core/src/core/types.ts:404](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L404) +[packages/core/src/types.ts:425](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L425) ---- +*** ### createAccount() @@ -68,9 +68,9 @@ #### Defined in -[core/src/core/types.ts:344](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L344) +[packages/core/src/types.ts:365](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L365) ---- +*** ### createGoal() @@ -86,9 +86,9 @@ #### Defined in -[core/src/core/types.ts:416](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L416) +[packages/core/src/types.ts:437](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L437) ---- +*** ### createMemory() @@ -108,9 +108,9 @@ #### Defined in -[core/src/core/types.ts:397](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L397) +[packages/core/src/types.ts:418](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L418) ---- +*** ### createRelationship() @@ -130,9 +130,9 @@ #### Defined in -[core/src/core/types.ts:437](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L437) +[packages/core/src/types.ts:458](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L458) ---- +*** ### createRoom() @@ -148,9 +148,9 @@ #### Defined in -[core/src/core/types.ts:420](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L420) +[packages/core/src/types.ts:441](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L441) ---- +*** ### getAccountById() @@ -166,9 +166,9 @@ #### Defined in -[core/src/core/types.ts:343](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L343) +[packages/core/src/types.ts:364](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L364) ---- +*** ### getActorDetails() @@ -186,9 +186,9 @@ #### Defined in -[core/src/core/types.ts:373](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L373) +[packages/core/src/types.ts:394](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L394) ---- +*** ### getCachedEmbeddings() @@ -198,17 +198,17 @@ • **params** -• **params.query_field_name**: `string` +• **params.query\_field\_name**: `string` -• **params.query_field_sub_name**: `string` +• **params.query\_field\_sub\_name**: `string` -• **params.query_input**: `string` +• **params.query\_input**: `string` -• **params.query_match_count**: `number` +• **params.query\_match\_count**: `number` -• **params.query_table_name**: `string` +• **params.query\_table\_name**: `string` -• **params.query_threshold**: `number` +• **params.query\_threshold**: `number` #### Returns @@ -216,9 +216,9 @@ #### Defined in -[core/src/core/types.ts:359](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L359) +[packages/core/src/types.ts:380](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L380) ---- +*** ### getGoals() @@ -242,9 +242,9 @@ #### Defined in -[core/src/core/types.ts:409](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L409) +[packages/core/src/types.ts:430](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L430) ---- +*** ### getMemories() @@ -274,9 +274,9 @@ #### Defined in -[core/src/core/types.ts:345](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L345) +[packages/core/src/types.ts:366](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L366) ---- +*** ### getMemoriesByRoomIds() @@ -296,9 +296,9 @@ #### Defined in -[core/src/core/types.ts:355](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L355) +[packages/core/src/types.ts:376](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L376) ---- +*** ### getMemoryById() @@ -314,9 +314,9 @@ #### Defined in -[core/src/core/types.ts:354](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L354) +[packages/core/src/types.ts:375](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L375) ---- +*** ### getParticipantsForAccount() @@ -332,9 +332,9 @@ #### Defined in -[core/src/core/types.ts:426](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L426) +[packages/core/src/types.ts:447](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L447) ---- +*** ### getParticipantsForRoom() @@ -350,9 +350,9 @@ #### Defined in -[core/src/core/types.ts:427](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L427) +[packages/core/src/types.ts:448](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L448) ---- +*** ### getParticipantUserState() @@ -370,9 +370,9 @@ #### Defined in -[core/src/core/types.ts:428](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L428) +[packages/core/src/types.ts:449](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L449) ---- +*** ### getRelationship() @@ -392,9 +392,9 @@ #### Defined in -[core/src/core/types.ts:438](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L438) +[packages/core/src/types.ts:459](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L459) ---- +*** ### getRelationships() @@ -412,9 +412,9 @@ #### Defined in -[core/src/core/types.ts:442](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L442) +[packages/core/src/types.ts:463](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L463) ---- +*** ### getRoom() @@ -430,9 +430,9 @@ #### Defined in -[core/src/core/types.ts:419](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L419) +[packages/core/src/types.ts:440](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L440) ---- +*** ### getRoomsForParticipant() @@ -448,9 +448,9 @@ #### Defined in -[core/src/core/types.ts:422](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L422) +[packages/core/src/types.ts:443](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L443) ---- +*** ### getRoomsForParticipants() @@ -466,9 +466,9 @@ #### Defined in -[core/src/core/types.ts:423](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L423) +[packages/core/src/types.ts:444](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L444) ---- +*** ### log() @@ -492,9 +492,9 @@ #### Defined in -[core/src/core/types.ts:367](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L367) +[packages/core/src/types.ts:388](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L388) ---- +*** ### removeAllGoals() @@ -510,9 +510,9 @@ #### Defined in -[core/src/core/types.ts:418](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L418) +[packages/core/src/types.ts:439](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L439) ---- +*** ### removeAllMemories() @@ -530,9 +530,9 @@ #### Defined in -[core/src/core/types.ts:403](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L403) +[packages/core/src/types.ts:424](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L424) ---- +*** ### removeGoal() @@ -548,9 +548,9 @@ #### Defined in -[core/src/core/types.ts:417](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L417) +[packages/core/src/types.ts:438](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L438) ---- +*** ### removeMemory() @@ -568,9 +568,9 @@ #### Defined in -[core/src/core/types.ts:402](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L402) +[packages/core/src/types.ts:423](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L423) ---- +*** ### removeParticipant() @@ -588,9 +588,9 @@ #### Defined in -[core/src/core/types.ts:425](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L425) +[packages/core/src/types.ts:446](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L446) ---- +*** ### removeRoom() @@ -606,9 +606,9 @@ #### Defined in -[core/src/core/types.ts:421](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L421) +[packages/core/src/types.ts:442](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L442) ---- +*** ### searchMemories() @@ -620,9 +620,9 @@ • **params.embedding**: `number`[] -• **params.match_count**: `number` +• **params.match\_count**: `number` -• **params.match_threshold**: `number` +• **params.match\_threshold**: `number` • **params.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` @@ -636,9 +636,9 @@ #### Defined in -[core/src/core/types.ts:374](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L374) +[packages/core/src/types.ts:395](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L395) ---- +*** ### searchMemoriesByEmbedding() @@ -654,7 +654,7 @@ • **params.count?**: `number` -• **params.match_threshold?**: `number` +• **params.match\_threshold?**: `number` • **params.roomId?**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` @@ -668,9 +668,9 @@ #### Defined in -[core/src/core/types.ts:386](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L386) +[packages/core/src/types.ts:407](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L407) ---- +*** ### setParticipantUserState() @@ -690,9 +690,9 @@ #### Defined in -[core/src/core/types.ts:432](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L432) +[packages/core/src/types.ts:453](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L453) ---- +*** ### updateGoal() @@ -708,9 +708,9 @@ #### Defined in -[core/src/core/types.ts:415](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L415) +[packages/core/src/types.ts:436](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L436) ---- +*** ### updateGoalStatus() @@ -730,4 +730,4 @@ #### Defined in -[core/src/core/types.ts:382](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L382) +[packages/core/src/types.ts:403](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L403) diff --git a/docs/docs/api/interfaces/IImageDescriptionService.md b/docs/docs/api/interfaces/IImageDescriptionService.md new file mode 100644 index 00000000000..88eb6bd5924 --- /dev/null +++ b/docs/docs/api/interfaces/IImageDescriptionService.md @@ -0,0 +1,65 @@ +# Interface: IImageDescriptionService + +## Extends + +- [`Service`](../classes/Service.md) + +## Methods + +### describeImage() + +> **describeImage**(`imageUrl`): `Promise`\<`object`\> + +#### Parameters + +• **imageUrl**: `string` + +#### Returns + +`Promise`\<`object`\> + +##### description + +> **description**: `string` + +##### title + +> **title**: `string` + +#### Defined in + +[packages/core/src/types.ts:585](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L585) + +*** + +### getInstance() + +> **getInstance**(): [`IImageDescriptionService`](IImageDescriptionService.md) + +#### Returns + +[`IImageDescriptionService`](IImageDescriptionService.md) + +#### Defined in + +[packages/core/src/types.ts:583](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L583) + +*** + +### initialize() + +> **initialize**(`modelId`?, `device`?): `Promise`\<`void`\> + +#### Parameters + +• **modelId?**: `string` + +• **device?**: `string` + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/core/src/types.ts:584](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L584) diff --git a/docs/docs/api/interfaces/IImageRecognitionService.md b/docs/docs/api/interfaces/IImageRecognitionService.md deleted file mode 100644 index 80743e38c6a..00000000000 --- a/docs/docs/api/interfaces/IImageRecognitionService.md +++ /dev/null @@ -1,47 +0,0 @@ -# Interface: IImageRecognitionService - -## Methods - -### describeImage() - -> **describeImage**(`imageUrl`): `Promise`\<`object`\> - -#### Parameters - -• **imageUrl**: `string` - -#### Returns - -`Promise`\<`object`\> - -##### description - -> **description**: `string` - -##### title - -> **title**: `string` - -#### Defined in - -[core/src/core/types.ts:545](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L545) - ---- - -### initialize() - -> **initialize**(`modelId`?, `device`?): `Promise`\<`void`\> - -#### Parameters - -• **modelId?**: `string` - -• **device?**: `string` - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/core/types.ts:544](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L544) diff --git a/docs/docs/api/interfaces/ILlamaService.md b/docs/docs/api/interfaces/ILlamaService.md deleted file mode 100644 index 99f1d512e7e..00000000000 --- a/docs/docs/api/interfaces/ILlamaService.md +++ /dev/null @@ -1,89 +0,0 @@ -# Interface: ILlamaService - -## Methods - -### getEmbeddingResponse() - -> **getEmbeddingResponse**(`input`): `Promise`\<`number`[]\> - -#### Parameters - -• **input**: `string` - -#### Returns - -`Promise`\<`number`[]\> - -#### Defined in - -[core/src/core/types.ts:582](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L582) - ---- - -### initializeModel() - -> **initializeModel**(): `Promise`\<`void`\> - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[core/src/core/types.ts:565](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L565) - ---- - -### queueMessageCompletion() - -> **queueMessageCompletion**(`context`, `temperature`, `stop`, `frequency_penalty`, `presence_penalty`, `max_tokens`): `Promise`\<`any`\> - -#### Parameters - -• **context**: `string` - -• **temperature**: `number` - -• **stop**: `string`[] - -• **frequency_penalty**: `number` - -• **presence_penalty**: `number` - -• **max_tokens**: `number` - -#### Returns - -`Promise`\<`any`\> - -#### Defined in - -[core/src/core/types.ts:566](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L566) - ---- - -### queueTextCompletion() - -> **queueTextCompletion**(`context`, `temperature`, `stop`, `frequency_penalty`, `presence_penalty`, `max_tokens`): `Promise`\<`string`\> - -#### Parameters - -• **context**: `string` - -• **temperature**: `number` - -• **stop**: `string`[] - -• **frequency_penalty**: `number` - -• **presence_penalty**: `number` - -• **max_tokens**: `number` - -#### Returns - -`Promise`\<`string`\> - -#### Defined in - -[core/src/core/types.ts:574](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L574) diff --git a/docs/docs/api/interfaces/IMemoryManager.md b/docs/docs/api/interfaces/IMemoryManager.md index 9026f0b807f..4bac2ef5fd7 100644 --- a/docs/docs/api/interfaces/IMemoryManager.md +++ b/docs/docs/api/interfaces/IMemoryManager.md @@ -8,9 +8,9 @@ #### Defined in -[core/src/core/types.ts:449](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L449) +[packages/core/src/types.ts:470](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L470) ---- +*** ### runtime @@ -18,9 +18,9 @@ #### Defined in -[core/src/core/types.ts:446](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L446) +[packages/core/src/types.ts:467](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L467) ---- +*** ### tableName @@ -28,7 +28,7 @@ #### Defined in -[core/src/core/types.ts:447](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L447) +[packages/core/src/types.ts:468](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L468) ## Methods @@ -46,9 +46,9 @@ #### Defined in -[core/src/core/types.ts:451](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L451) +[packages/core/src/types.ts:472](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L472) ---- +*** ### countMemories() @@ -66,9 +66,9 @@ #### Defined in -[core/src/core/types.ts:481](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L481) +[packages/core/src/types.ts:502](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L502) ---- +*** ### createMemory() @@ -86,9 +86,9 @@ #### Defined in -[core/src/core/types.ts:478](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L478) +[packages/core/src/types.ts:499](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L499) ---- +*** ### getCachedEmbeddings() @@ -104,9 +104,9 @@ #### Defined in -[core/src/core/types.ts:460](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L460) +[packages/core/src/types.ts:481](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L481) ---- +*** ### getMemories() @@ -134,9 +134,9 @@ #### Defined in -[core/src/core/types.ts:452](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L452) +[packages/core/src/types.ts:473](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L473) ---- +*** ### getMemoriesByRoomIds() @@ -156,9 +156,9 @@ #### Defined in -[core/src/core/types.ts:464](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L464) +[packages/core/src/types.ts:485](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L485) ---- +*** ### getMemoryById() @@ -174,9 +174,9 @@ #### Defined in -[core/src/core/types.ts:463](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L463) +[packages/core/src/types.ts:484](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L484) ---- +*** ### removeAllMemories() @@ -192,9 +192,9 @@ #### Defined in -[core/src/core/types.ts:480](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L480) +[packages/core/src/types.ts:501](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L501) ---- +*** ### removeMemory() @@ -210,9 +210,9 @@ #### Defined in -[core/src/core/types.ts:479](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L479) +[packages/core/src/types.ts:500](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L500) ---- +*** ### searchMemoriesByEmbedding() @@ -228,7 +228,7 @@ • **opts.count?**: `number` -• **opts.match_threshold?**: `number` +• **opts.match\_threshold?**: `number` • **opts.roomId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\` @@ -240,4 +240,4 @@ #### Defined in -[core/src/core/types.ts:468](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L468) +[packages/core/src/types.ts:489](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L489) diff --git a/docs/docs/api/interfaces/IPdfService.md b/docs/docs/api/interfaces/IPdfService.md index a4d4b011711..34f2294e703 100644 --- a/docs/docs/api/interfaces/IPdfService.md +++ b/docs/docs/api/interfaces/IPdfService.md @@ -1,5 +1,9 @@ # Interface: IPdfService +## Extends + +- [`Service`](../classes/Service.md) + ## Methods ### convertPdfToText() @@ -16,4 +20,4 @@ #### Defined in -[core/src/core/types.ts:598](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L598) +[packages/core/src/types.ts:642](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L642) diff --git a/docs/docs/api/interfaces/ISpeechService.md b/docs/docs/api/interfaces/ISpeechService.md index 1fd58914203..f3cf22f1d33 100644 --- a/docs/docs/api/interfaces/ISpeechService.md +++ b/docs/docs/api/interfaces/ISpeechService.md @@ -1,5 +1,9 @@ # Interface: ISpeechService +## Extends + +- [`Service`](../classes/Service.md) + ## Methods ### generate() @@ -18,4 +22,4 @@ #### Defined in -[core/src/core/types.ts:594](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L594) +[packages/core/src/types.ts:638](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L638) diff --git a/docs/docs/api/interfaces/ITextGenerationService.md b/docs/docs/api/interfaces/ITextGenerationService.md new file mode 100644 index 00000000000..d9a473e32b6 --- /dev/null +++ b/docs/docs/api/interfaces/ITextGenerationService.md @@ -0,0 +1,107 @@ +# Interface: ITextGenerationService + +## Extends + +- [`Service`](../classes/Service.md) + +## Methods + +### getEmbeddingResponse() + +> **getEmbeddingResponse**(`input`): `Promise`\<`number`[]\> + +#### Parameters + +• **input**: `string` + +#### Returns + +`Promise`\<`number`[]\> + +#### Defined in + +[packages/core/src/types.ts:625](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L625) + +*** + +### getInstance() + +> **getInstance**(): [`ITextGenerationService`](ITextGenerationService.md) + +#### Returns + +[`ITextGenerationService`](ITextGenerationService.md) + +#### Defined in + +[packages/core/src/types.ts:607](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L607) + +*** + +### initializeModel() + +> **initializeModel**(): `Promise`\<`void`\> + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[packages/core/src/types.ts:608](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L608) + +*** + +### queueMessageCompletion() + +> **queueMessageCompletion**(`context`, `temperature`, `stop`, `frequency_penalty`, `presence_penalty`, `max_tokens`): `Promise`\<`any`\> + +#### Parameters + +• **context**: `string` + +• **temperature**: `number` + +• **stop**: `string`[] + +• **frequency\_penalty**: `number` + +• **presence\_penalty**: `number` + +• **max\_tokens**: `number` + +#### Returns + +`Promise`\<`any`\> + +#### Defined in + +[packages/core/src/types.ts:609](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L609) + +*** + +### queueTextCompletion() + +> **queueTextCompletion**(`context`, `temperature`, `stop`, `frequency_penalty`, `presence_penalty`, `max_tokens`): `Promise`\<`string`\> + +#### Parameters + +• **context**: `string` + +• **temperature**: `number` + +• **stop**: `string`[] + +• **frequency\_penalty**: `number` + +• **presence\_penalty**: `number` + +• **max\_tokens**: `number` + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[packages/core/src/types.ts:617](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L617) diff --git a/docs/docs/api/interfaces/ITranscriptionService.md b/docs/docs/api/interfaces/ITranscriptionService.md index e21318f2812..680f2d02aa7 100644 --- a/docs/docs/api/interfaces/ITranscriptionService.md +++ b/docs/docs/api/interfaces/ITranscriptionService.md @@ -1,5 +1,9 @@ # Interface: ITranscriptionService +## Extends + +- [`Service`](../classes/Service.md) + ## Methods ### transcribe() @@ -16,9 +20,9 @@ #### Defined in -[core/src/core/types.ts:555](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L555) +[packages/core/src/types.ts:595](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L595) ---- +*** ### transcribeAttachment() @@ -34,9 +38,9 @@ #### Defined in -[core/src/core/types.ts:551](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L551) +[packages/core/src/types.ts:591](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L591) ---- +*** ### transcribeAttachmentLocally() @@ -52,9 +56,9 @@ #### Defined in -[core/src/core/types.ts:552](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L552) +[packages/core/src/types.ts:592](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L592) ---- +*** ### transcribeLocally() @@ -70,4 +74,4 @@ #### Defined in -[core/src/core/types.ts:556](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L556) +[packages/core/src/types.ts:596](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L596) diff --git a/docs/docs/api/interfaces/IVideoService.md b/docs/docs/api/interfaces/IVideoService.md index 37974807efb..869f3b6ab05 100644 --- a/docs/docs/api/interfaces/IVideoService.md +++ b/docs/docs/api/interfaces/IVideoService.md @@ -1,7 +1,47 @@ # Interface: IVideoService +## Extends + +- [`Service`](../classes/Service.md) + ## Methods +### downloadVideo() + +> **downloadVideo**(`videoInfo`): `Promise`\<`string`\> + +#### Parameters + +• **videoInfo**: [`Media`](../type-aliases/Media.md) + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[packages/core/src/types.ts:603](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L603) + +*** + +### fetchVideoInfo() + +> **fetchVideoInfo**(`url`): `Promise`\<[`Media`](../type-aliases/Media.md)\> + +#### Parameters + +• **url**: `string` + +#### Returns + +`Promise`\<[`Media`](../type-aliases/Media.md)\> + +#### Defined in + +[packages/core/src/types.ts:602](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L602) + +*** + ### isVideoUrl() > **isVideoUrl**(`url`): `boolean` @@ -16,9 +56,9 @@ #### Defined in -[core/src/core/types.ts:560](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L560) +[packages/core/src/types.ts:600](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L600) ---- +*** ### processVideo() @@ -34,4 +74,4 @@ #### Defined in -[core/src/core/types.ts:561](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L561) +[packages/core/src/types.ts:601](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L601) diff --git a/docs/docs/api/interfaces/Memory.md b/docs/docs/api/interfaces/Memory.md index b395bcfa43d..f4d3853c543 100644 --- a/docs/docs/api/interfaces/Memory.md +++ b/docs/docs/api/interfaces/Memory.md @@ -10,9 +10,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:154](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L154) +[packages/core/src/types.ts:169](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L169) ---- +*** ### content @@ -20,9 +20,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:156](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L156) +[packages/core/src/types.ts:171](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L171) ---- +*** ### createdAt? @@ -30,9 +30,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:155](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L155) +[packages/core/src/types.ts:170](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L170) ---- +*** ### embedding? @@ -40,9 +40,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:157](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L157) +[packages/core/src/types.ts:172](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L172) ---- +*** ### id? @@ -50,9 +50,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:152](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L152) +[packages/core/src/types.ts:167](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L167) ---- +*** ### roomId @@ -60,9 +60,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:158](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L158) +[packages/core/src/types.ts:173](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L173) ---- +*** ### unique? @@ -70,9 +70,9 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:159](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L159) +[packages/core/src/types.ts:174](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L174) ---- +*** ### userId @@ -80,4 +80,4 @@ Represents a memory record, which could be a message or any other piece of infor #### Defined in -[core/src/core/types.ts:153](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L153) +[packages/core/src/types.ts:168](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L168) diff --git a/docs/docs/api/interfaces/MessageExample.md b/docs/docs/api/interfaces/MessageExample.md index 100e99f58e3..7d382ce7a84 100644 --- a/docs/docs/api/interfaces/MessageExample.md +++ b/docs/docs/api/interfaces/MessageExample.md @@ -10,9 +10,9 @@ Represents an example of a message, typically used for demonstrating or testing #### Defined in -[core/src/core/types.ts:167](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L167) +[packages/core/src/types.ts:182](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L182) ---- +*** ### user @@ -20,4 +20,4 @@ Represents an example of a message, typically used for demonstrating or testing #### Defined in -[core/src/core/types.ts:166](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L166) +[packages/core/src/types.ts:181](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L181) diff --git a/docs/docs/api/interfaces/Objective.md b/docs/docs/api/interfaces/Objective.md index 6fd03f9c5e8..6f22a6552de 100644 --- a/docs/docs/api/interfaces/Objective.md +++ b/docs/docs/api/interfaces/Objective.md @@ -10,9 +10,9 @@ Represents an objective within a goal, detailing what needs to be achieved and w #### Defined in -[core/src/core/types.ts:54](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L54) +[packages/core/src/types.ts:53](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L53) ---- +*** ### description @@ -20,9 +20,9 @@ Represents an objective within a goal, detailing what needs to be achieved and w #### Defined in -[core/src/core/types.ts:53](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L53) +[packages/core/src/types.ts:52](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L52) ---- +*** ### id? @@ -30,4 +30,4 @@ Represents an objective within a goal, detailing what needs to be achieved and w #### Defined in -[core/src/core/types.ts:52](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L52) +[packages/core/src/types.ts:51](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L51) diff --git a/docs/docs/api/interfaces/Participant.md b/docs/docs/api/interfaces/Participant.md index e8a774c6f21..121b76e5db2 100644 --- a/docs/docs/api/interfaces/Participant.md +++ b/docs/docs/api/interfaces/Participant.md @@ -10,9 +10,9 @@ Represents a participant in a room, including their ID and account details. #### Defined in -[core/src/core/types.ts:270](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L270) +[packages/core/src/types.ts:286](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L286) ---- +*** ### id @@ -20,4 +20,4 @@ Represents a participant in a room, including their ID and account details. #### Defined in -[core/src/core/types.ts:269](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L269) +[packages/core/src/types.ts:285](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L285) diff --git a/docs/docs/api/interfaces/Provider.md b/docs/docs/api/interfaces/Provider.md index 8951692f9c1..daa6911d473 100644 --- a/docs/docs/api/interfaces/Provider.md +++ b/docs/docs/api/interfaces/Provider.md @@ -22,4 +22,4 @@ Represents a provider, which is used to retrieve information or perform actions #### Defined in -[core/src/core/types.ts:233](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L233) +[packages/core/src/types.ts:249](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L249) diff --git a/docs/docs/api/interfaces/Relationship.md b/docs/docs/api/interfaces/Relationship.md index fb5742fb7c3..e79298c5b96 100644 --- a/docs/docs/api/interfaces/Relationship.md +++ b/docs/docs/api/interfaces/Relationship.md @@ -10,9 +10,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:250](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L250) +[packages/core/src/types.ts:266](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L266) ---- +*** ### id @@ -20,9 +20,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:244](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L244) +[packages/core/src/types.ts:260](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L260) ---- +*** ### roomId @@ -30,9 +30,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:248](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L248) +[packages/core/src/types.ts:264](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L264) ---- +*** ### status @@ -40,9 +40,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:249](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L249) +[packages/core/src/types.ts:265](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L265) ---- +*** ### userA @@ -50,9 +50,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:245](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L245) +[packages/core/src/types.ts:261](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L261) ---- +*** ### userB @@ -60,9 +60,9 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:246](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L246) +[packages/core/src/types.ts:262](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L262) ---- +*** ### userId @@ -70,4 +70,4 @@ Represents a relationship between two users, including their IDs, the status of #### Defined in -[core/src/core/types.ts:247](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L247) +[packages/core/src/types.ts:263](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L263) diff --git a/docs/docs/api/interfaces/Room.md b/docs/docs/api/interfaces/Room.md index 63a2ed05817..b89652b994a 100644 --- a/docs/docs/api/interfaces/Room.md +++ b/docs/docs/api/interfaces/Room.md @@ -10,9 +10,9 @@ Represents a room or conversation context, including its ID and a list of partic #### Defined in -[core/src/core/types.ts:277](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L277) +[packages/core/src/types.ts:293](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L293) ---- +*** ### participants @@ -20,4 +20,4 @@ Represents a room or conversation context, including its ID and a list of partic #### Defined in -[core/src/core/types.ts:278](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L278) +[packages/core/src/types.ts:294](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L294) diff --git a/docs/docs/api/interfaces/State.md b/docs/docs/api/interfaces/State.md index 177552ce39d..774f0a29bfb 100644 --- a/docs/docs/api/interfaces/State.md +++ b/docs/docs/api/interfaces/State.md @@ -4,7 +4,7 @@ Represents the state of the conversation or context in which the agent is operat ## Indexable -\[`key`: `string`\]: `unknown` + \[`key`: `string`\]: `unknown` ## Properties @@ -14,9 +14,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:140](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L140) +[packages/core/src/types.ts:155](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L155) ---- +*** ### actionNames? @@ -24,9 +24,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:137](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L137) +[packages/core/src/types.ts:152](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L152) ---- +*** ### actions? @@ -34,9 +34,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:138](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L138) +[packages/core/src/types.ts:153](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L153) ---- +*** ### actionsData? @@ -44,9 +44,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:139](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L139) +[packages/core/src/types.ts:154](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L154) ---- +*** ### actors @@ -54,9 +54,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:127](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L127) +[packages/core/src/types.ts:146](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L146) ---- +*** ### actorsData? @@ -64,9 +64,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:128](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L128) +[packages/core/src/types.ts:147](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L147) ---- +*** ### agentId? @@ -74,9 +74,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:119](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L119) +[packages/core/src/types.ts:138](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L138) ---- +*** ### agentName? @@ -84,9 +84,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:125](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L125) +[packages/core/src/types.ts:144](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L144) ---- +*** ### bio @@ -94,9 +94,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:120](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L120) +[packages/core/src/types.ts:139](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L139) ---- +*** ### goals? @@ -104,9 +104,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:129](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L129) +[packages/core/src/types.ts:148](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L148) ---- +*** ### goalsData? @@ -114,9 +114,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:130](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L130) +[packages/core/src/types.ts:149](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L149) ---- +*** ### lore @@ -124,9 +124,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:121](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L121) +[packages/core/src/types.ts:140](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L140) ---- +*** ### messageDirections @@ -134,9 +134,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:122](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L122) +[packages/core/src/types.ts:141](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L141) ---- +*** ### postDirections @@ -144,9 +144,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:123](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L123) +[packages/core/src/types.ts:142](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L142) ---- +*** ### providers? @@ -154,29 +154,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:141](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L141) +[packages/core/src/types.ts:156](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L156) ---- - -### recentFacts? - -> `optional` **recentFacts**: `string` - -#### Defined in - -[core/src/core/types.ts:133](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L133) - ---- - -### recentFactsData? - -> `optional` **recentFactsData**: [`Memory`](Memory.md)[] - -#### Defined in - -[core/src/core/types.ts:134](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L134) - ---- +*** ### recentInteractions? @@ -184,9 +164,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:144](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L144) +[packages/core/src/types.ts:159](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L159) ---- +*** ### recentInteractionsData? @@ -194,9 +174,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:143](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L143) +[packages/core/src/types.ts:158](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L158) ---- +*** ### recentMessages @@ -204,9 +184,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:131](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L131) +[packages/core/src/types.ts:150](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L150) ---- +*** ### recentMessagesData @@ -214,29 +194,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:132](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L132) - ---- - -### relevantFacts? - -> `optional` **relevantFacts**: `string` - -#### Defined in - -[core/src/core/types.ts:135](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L135) - ---- - -### relevantFactsData? - -> `optional` **relevantFactsData**: [`Memory`](Memory.md)[] - -#### Defined in - -[core/src/core/types.ts:136](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L136) +[packages/core/src/types.ts:151](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L151) ---- +*** ### responseData? @@ -244,9 +204,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:142](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L142) +[packages/core/src/types.ts:157](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L157) ---- +*** ### roomId @@ -254,9 +214,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:124](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L124) +[packages/core/src/types.ts:143](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L143) ---- +*** ### senderName? @@ -264,9 +224,9 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:126](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L126) +[packages/core/src/types.ts:145](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L145) ---- +*** ### userId? @@ -274,4 +234,4 @@ Represents the state of the conversation or context in which the agent is operat #### Defined in -[core/src/core/types.ts:118](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L118) +[packages/core/src/types.ts:137](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L137) diff --git a/docs/docs/api/type-aliases/Character.md b/docs/docs/api/type-aliases/Character.md index 511d14ef778..f51884bb3fc 100644 --- a/docs/docs/api/type-aliases/Character.md +++ b/docs/docs/api/type-aliases/Character.md @@ -20,10 +20,6 @@ > `optional` **id**: [`UUID`](UUID.md) -### imageGenModel? - -> `optional` **imageGenModel**: [`ImageGenModel`](../enumerations/ImageGenModel.md) - ### knowledge? > `optional` **knowledge**: `string`[] @@ -42,7 +38,7 @@ ### modelProvider -> **modelProvider**: [`ModelProvider`](../enumerations/ModelProvider.md) +> **modelProvider**: [`ModelProviderName`](../enumerations/ModelProviderName.md) ### name @@ -78,7 +74,7 @@ #### Index Signature -\[`key`: `string`\]: `string` + \[`key`: `string`\]: `string` ### settings.voice? @@ -118,7 +114,7 @@ #### Index Signature -\[`key`: `string`\]: `string` + \[`key`: `string`\]: `string` ### topics @@ -126,4 +122,4 @@ ## Defined in -[core/src/core/types.ts:305](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L305) +[packages/core/src/types.ts:327](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L327) diff --git a/docs/docs/api/type-aliases/Client.md b/docs/docs/api/type-aliases/Client.md new file mode 100644 index 00000000000..acb36692999 --- /dev/null +++ b/docs/docs/api/type-aliases/Client.md @@ -0,0 +1,33 @@ +# Type Alias: Client + +> **Client**: `object` + +## Type declaration + +### start() + +> **start**: (`runtime`?) => `Promise`\<`unknown`\> + +#### Parameters + +• **runtime?**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) + +#### Returns + +`Promise`\<`unknown`\> + +### stop() + +> **stop**: (`runtime`?) => `Promise`\<`unknown`\> + +#### Parameters + +• **runtime?**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md) + +#### Returns + +`Promise`\<`unknown`\> + +## Defined in + +[packages/core/src/types.ts:306](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L306) diff --git a/docs/docs/api/type-aliases/Handler.md b/docs/docs/api/type-aliases/Handler.md index 6b3e13d5b4d..c351005923d 100644 --- a/docs/docs/api/type-aliases/Handler.md +++ b/docs/docs/api/type-aliases/Handler.md @@ -22,4 +22,4 @@ Represents the type of a handler function, which takes a runtime instance, a mes ## Defined in -[core/src/core/types.ts:173](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L173) +[packages/core/src/types.ts:188](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L188) diff --git a/docs/docs/api/type-aliases/HandlerCallback.md b/docs/docs/api/type-aliases/HandlerCallback.md index 2d9641aea5b..0704f793771 100644 --- a/docs/docs/api/type-aliases/HandlerCallback.md +++ b/docs/docs/api/type-aliases/HandlerCallback.md @@ -14,4 +14,4 @@ ## Defined in -[core/src/core/types.ts:182](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L182) +[packages/core/src/types.ts:197](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L197) diff --git a/docs/docs/api/type-aliases/Media.md b/docs/docs/api/type-aliases/Media.md index 0585ea6b841..f76ba06d8da 100644 --- a/docs/docs/api/type-aliases/Media.md +++ b/docs/docs/api/type-aliases/Media.md @@ -30,4 +30,4 @@ ## Defined in -[core/src/core/types.ts:281](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L281) +[packages/core/src/types.ts:297](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L297) diff --git a/docs/docs/api/type-aliases/Model.md b/docs/docs/api/type-aliases/Model.md index 0449532f653..74f0c15d71a 100644 --- a/docs/docs/api/type-aliases/Model.md +++ b/docs/docs/api/type-aliases/Model.md @@ -8,6 +8,14 @@ > `optional` **endpoint**: `string` +### imageSettings? + +> `optional` **imageSettings**: `object` + +### imageSettings.steps? + +> `optional` **steps**: `number` + ### model > **model**: `object` @@ -16,6 +24,10 @@ > `optional` **embedding**: `string` +### model.image? + +> `optional` **image**: `string` + ### model.large > **large**: `string` @@ -32,9 +44,9 @@ > **settings**: `object` -### settings.frequency_penalty? +### settings.frequency\_penalty? -> `optional` **frequency_penalty**: `number` +> `optional` **frequency\_penalty**: `number` ### settings.maxInputTokens @@ -44,13 +56,13 @@ > **maxOutputTokens**: `number` -### settings.presence_penalty? +### settings.presence\_penalty? -> `optional` **presence_penalty**: `number` +> `optional` **presence\_penalty**: `number` -### settings.repetition_penalty? +### settings.repetition\_penalty? -> `optional` **repetition_penalty**: `number` +> `optional` **repetition\_penalty**: `number` ### settings.stop @@ -62,4 +74,4 @@ ## Defined in -[core/src/core/types.ts:82](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L82) +[packages/core/src/types.ts:82](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L82) diff --git a/docs/docs/api/type-aliases/Models.md b/docs/docs/api/type-aliases/Models.md new file mode 100644 index 00000000000..504f9779120 --- /dev/null +++ b/docs/docs/api/type-aliases/Models.md @@ -0,0 +1,53 @@ +# Type Alias: Models + +> **Models**: `object` + +## Type declaration + +### anthropic + +> **anthropic**: [`Model`](Model.md) + +### claude\_vertex + +> **claude\_vertex**: [`Model`](Model.md) + +### google + +> **google**: [`Model`](Model.md) + +### grok + +> **grok**: [`Model`](Model.md) + +### groq + +> **groq**: [`Model`](Model.md) + +### llama\_cloud + +> **llama\_cloud**: [`Model`](Model.md) + +### llama\_local + +> **llama\_local**: [`Model`](Model.md) + +### ollama + +> **ollama**: [`Model`](Model.md) + +### openai + +> **openai**: [`Model`](Model.md) + +### openrouter + +> **openrouter**: [`Model`](Model.md) + +### redpill + +> **redpill**: [`Model`](Model.md) + +## Defined in + +[packages/core/src/types.ts:105](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L105) diff --git a/docs/docs/api/type-aliases/Plugin.md b/docs/docs/api/type-aliases/Plugin.md index 3598e5ac7bc..192caf873a4 100644 --- a/docs/docs/api/type-aliases/Plugin.md +++ b/docs/docs/api/type-aliases/Plugin.md @@ -4,26 +4,30 @@ ## Type declaration -### actions +### actions? -> **actions**: [`Action`](../interfaces/Action.md)[] +> `optional` **actions**: [`Action`](../interfaces/Action.md)[] ### description > **description**: `string` -### evaluators +### evaluators? -> **evaluators**: [`Evaluator`](../interfaces/Evaluator.md)[] +> `optional` **evaluators**: [`Evaluator`](../interfaces/Evaluator.md)[] ### name > **name**: `string` -### providers +### providers? -> **providers**: [`Provider`](../interfaces/Provider.md)[] +> `optional` **providers**: [`Provider`](../interfaces/Provider.md)[] + +### services? + +> `optional` **services**: [`Service`](../classes/Service.md)[] ## Defined in -[core/src/core/types.ts:290](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L290) +[packages/core/src/types.ts:311](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L311) diff --git a/docs/docs/api/type-aliases/UUID.md b/docs/docs/api/type-aliases/UUID.md index bf620cb27db..eb2f8825873 100644 --- a/docs/docs/api/type-aliases/UUID.md +++ b/docs/docs/api/type-aliases/UUID.md @@ -6,4 +6,4 @@ Represents a UUID, which is a universally unique identifier conforming to the UU ## Defined in -[core/src/core/types.ts:7](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L7) +[packages/core/src/types.ts:6](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L6) diff --git a/docs/docs/api/type-aliases/Validator.md b/docs/docs/api/type-aliases/Validator.md index 3289d9e2e56..4a534a105ca 100644 --- a/docs/docs/api/type-aliases/Validator.md +++ b/docs/docs/api/type-aliases/Validator.md @@ -18,4 +18,4 @@ Represents the type of a validator function, which takes a runtime instance, a m ## Defined in -[core/src/core/types.ts:190](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/types.ts#L190) +[packages/core/src/types.ts:205](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/types.ts#L205) diff --git a/docs/docs/api/typedoc-sidebar.cjs b/docs/docs/api/typedoc-sidebar.cjs index 6c759f89fee..ff4ac8aa329 100644 --- a/docs/docs/api/typedoc-sidebar.cjs +++ b/docs/docs/api/typedoc-sidebar.cjs @@ -1,552 +1,4 @@ // @ts-check /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ -const typedocSidebar = { - items: [ - { - type: "category", - label: "Enumerations", - items: [ - { type: "doc", id: "api/enumerations/Clients", label: "Clients" }, - { type: "doc", id: "api/enumerations/GoalStatus", label: "GoalStatus" }, - { - type: "doc", - id: "api/enumerations/ImageGenModel", - label: "ImageGenModel", - }, - { type: "doc", id: "api/enumerations/ModelClass", label: "ModelClass" }, - { - type: "doc", - id: "api/enumerations/ModelProvider", - label: "ModelProvider", - }, - ], - }, - { - type: "category", - label: "Classes", - items: [ - { type: "doc", id: "api/classes/AgentRuntime", label: "AgentRuntime" }, - { - type: "doc", - id: "api/classes/DatabaseAdapter", - label: "DatabaseAdapter", - }, - { type: "doc", id: "api/classes/DirectClient", label: "DirectClient" }, - { - type: "doc", - id: "api/classes/DiscordClient", - label: "DiscordClient", - }, - { - type: "doc", - id: "api/classes/MemoryManager", - label: "MemoryManager", - }, - { - type: "doc", - id: "api/classes/PostgresDatabaseAdapter", - label: "PostgresDatabaseAdapter", - }, - { - type: "doc", - id: "api/classes/SqliteDatabaseAdapter", - label: "SqliteDatabaseAdapter", - }, - { - type: "doc", - id: "api/classes/TelegramClient", - label: "TelegramClient", - }, - { - type: "doc", - id: "api/classes/TokenProvider", - label: "TokenProvider", - }, - { - type: "doc", - id: "api/classes/TwitterInteractionClient", - label: "TwitterInteractionClient", - }, - { - type: "doc", - id: "api/classes/TwitterPostClient", - label: "TwitterPostClient", - }, - { - type: "doc", - id: "api/classes/TwitterSearchClient", - label: "TwitterSearchClient", - }, - { - type: "doc", - id: "api/classes/WalletProvider", - label: "WalletProvider", - }, - ], - }, - { - type: "category", - label: "Interfaces", - items: [ - { type: "doc", id: "api/interfaces/Account", label: "Account" }, - { type: "doc", id: "api/interfaces/Action", label: "Action" }, - { - type: "doc", - id: "api/interfaces/ActionExample", - label: "ActionExample", - }, - { type: "doc", id: "api/interfaces/Actor", label: "Actor" }, - { type: "doc", id: "api/interfaces/Content", label: "Content" }, - { - type: "doc", - id: "api/interfaces/ConversationExample", - label: "ConversationExample", - }, - { - type: "doc", - id: "api/interfaces/CreateAndBuyContent", - label: "CreateAndBuyContent", - }, - { - type: "doc", - id: "api/interfaces/EvaluationExample", - label: "EvaluationExample", - }, - { type: "doc", id: "api/interfaces/Evaluator", label: "Evaluator" }, - { type: "doc", id: "api/interfaces/Goal", label: "Goal" }, - { - type: "doc", - id: "api/interfaces/IAgentRuntime", - label: "IAgentRuntime", - }, - { - type: "doc", - id: "api/interfaces/IBrowserService", - label: "IBrowserService", - }, - { - type: "doc", - id: "api/interfaces/IDatabaseAdapter", - label: "IDatabaseAdapter", - }, - { - type: "doc", - id: "api/interfaces/IImageRecognitionService", - label: "IImageRecognitionService", - }, - { - type: "doc", - id: "api/interfaces/ILlamaService", - label: "ILlamaService", - }, - { - type: "doc", - id: "api/interfaces/IMemoryManager", - label: "IMemoryManager", - }, - { type: "doc", id: "api/interfaces/IPdfService", label: "IPdfService" }, - { - type: "doc", - id: "api/interfaces/ISpeechService", - label: "ISpeechService", - }, - { - type: "doc", - id: "api/interfaces/ITranscriptionService", - label: "ITranscriptionService", - }, - { - type: "doc", - id: "api/interfaces/IVideoService", - label: "IVideoService", - }, - { type: "doc", id: "api/interfaces/Memory", label: "Memory" }, - { - type: "doc", - id: "api/interfaces/MessageExample", - label: "MessageExample", - }, - { type: "doc", id: "api/interfaces/Objective", label: "Objective" }, - { type: "doc", id: "api/interfaces/Participant", label: "Participant" }, - { type: "doc", id: "api/interfaces/Provider", label: "Provider" }, - { - type: "doc", - id: "api/interfaces/Relationship", - label: "Relationship", - }, - { type: "doc", id: "api/interfaces/Room", label: "Room" }, - { type: "doc", id: "api/interfaces/State", label: "State" }, - ], - }, - { - type: "category", - label: "Type Aliases", - items: [ - { type: "doc", id: "api/type-aliases/Character", label: "Character" }, - { type: "doc", id: "api/type-aliases/Handler", label: "Handler" }, - { - type: "doc", - id: "api/type-aliases/HandlerCallback", - label: "HandlerCallback", - }, - { type: "doc", id: "api/type-aliases/Media", label: "Media" }, - { type: "doc", id: "api/type-aliases/Model", label: "Model" }, - { type: "doc", id: "api/type-aliases/Plugin", label: "Plugin" }, - { type: "doc", id: "api/type-aliases/UUID", label: "UUID" }, - { type: "doc", id: "api/type-aliases/Validator", label: "Validator" }, - ], - }, - { - type: "category", - label: "Variables", - items: [ - { - type: "doc", - id: "api/variables/boredomProvider", - label: "boredomProvider", - }, - { - type: "doc", - id: "api/variables/continueAction", - label: "continueAction", - }, - { - type: "doc", - id: "api/variables/defaultActions", - label: "defaultActions", - }, - { - type: "doc", - id: "api/variables/defaultCharacter", - label: "defaultCharacter", - }, - { - type: "doc", - id: "api/variables/defaultEvaluators", - label: "defaultEvaluators", - }, - { - type: "doc", - id: "api/variables/defaultProviders", - label: "defaultProviders", - }, - { type: "doc", id: "api/variables/elizaLogger", label: "elizaLogger" }, - { - type: "doc", - id: "api/variables/embeddingDimension", - label: "embeddingDimension", - }, - { - type: "doc", - id: "api/variables/embeddingZeroVector", - label: "embeddingZeroVector", - }, - { - type: "doc", - id: "api/variables/evaluationTemplate", - label: "evaluationTemplate", - }, - { type: "doc", id: "api/variables/executeSwap", label: "executeSwap" }, - { type: "doc", id: "api/variables/followRoom", label: "followRoom" }, - { type: "doc", id: "api/variables/ignore", label: "ignore" }, - { - type: "doc", - id: "api/variables/imageGeneration", - label: "imageGeneration", - }, - { - type: "doc", - id: "api/variables/imageGenModels", - label: "imageGenModels", - }, - { - type: "doc", - id: "api/variables/messageHandlerTemplate", - label: "messageHandlerTemplate", - }, - { type: "doc", id: "api/variables/muteRoom", label: "muteRoom" }, - { type: "doc", id: "api/variables/none", label: "none" }, - { - type: "doc", - id: "api/variables/orderBookProvider", - label: "orderBookProvider", - }, - { - type: "doc", - id: "api/variables/shouldContinueTemplate", - label: "shouldContinueTemplate", - }, - { - type: "doc", - id: "api/variables/shouldFollowTemplate", - label: "shouldFollowTemplate", - }, - { - type: "doc", - id: "api/variables/shouldMuteTemplate", - label: "shouldMuteTemplate", - }, - { - type: "doc", - id: "api/variables/shouldUnmuteTemplate", - label: "shouldUnmuteTemplate", - }, - { - type: "doc", - id: "api/variables/timeProvider", - label: "timeProvider", - }, - { - type: "doc", - id: "api/variables/tokenProvider", - label: "tokenProvider", - }, - { - type: "doc", - id: "api/variables/unfollowRoom", - label: "unfollowRoom", - }, - { type: "doc", id: "api/variables/unmuteRoom", label: "unmuteRoom" }, - { - type: "doc", - id: "api/variables/walletProvider", - label: "walletProvider", - }, - ], - }, - { - type: "category", - label: "Functions", - items: [ - { type: "doc", id: "api/functions/addHeader", label: "addHeader" }, - { type: "doc", id: "api/functions/buyToken", label: "buyToken" }, - { - type: "doc", - id: "api/functions/composeActionExamples", - label: "composeActionExamples", - }, - { - type: "doc", - id: "api/functions/composeContext", - label: "composeContext", - }, - { - type: "doc", - id: "api/functions/createAgentRuntime", - label: "createAgentRuntime", - }, - { - type: "doc", - id: "api/functions/createAndBuyToken", - label: "createAndBuyToken", - }, - { - type: "doc", - id: "api/functions/createDirectRuntime", - label: "createDirectRuntime", - }, - { type: "doc", id: "api/functions/createGoal", label: "createGoal" }, - { - type: "doc", - id: "api/functions/createRelationship", - label: "createRelationship", - }, - { type: "doc", id: "api/functions/embed", label: "embed" }, - { - type: "doc", - id: "api/functions/formatActionNames", - label: "formatActionNames", - }, - { - type: "doc", - id: "api/functions/formatActions", - label: "formatActions", - }, - { - type: "doc", - id: "api/functions/formatActors", - label: "formatActors", - }, - { - type: "doc", - id: "api/functions/formatEvaluatorExampleDescriptions", - label: "formatEvaluatorExampleDescriptions", - }, - { - type: "doc", - id: "api/functions/formatEvaluatorExamples", - label: "formatEvaluatorExamples", - }, - { - type: "doc", - id: "api/functions/formatEvaluatorNames", - label: "formatEvaluatorNames", - }, - { - type: "doc", - id: "api/functions/formatEvaluators", - label: "formatEvaluators", - }, - { - type: "doc", - id: "api/functions/formatGoalsAsString", - label: "formatGoalsAsString", - }, - { - type: "doc", - id: "api/functions/formatMessages", - label: "formatMessages", - }, - { type: "doc", id: "api/functions/formatPosts", label: "formatPosts" }, - { - type: "doc", - id: "api/functions/formatRelationships", - label: "formatRelationships", - }, - { - type: "doc", - id: "api/functions/formatTimestamp", - label: "formatTimestamp", - }, - { - type: "doc", - id: "api/functions/generateCaption", - label: "generateCaption", - }, - { - type: "doc", - id: "api/functions/generateImage", - label: "generateImage", - }, - { - type: "doc", - id: "api/functions/generateMessageResponse", - label: "generateMessageResponse", - }, - { - type: "doc", - id: "api/functions/generateObject", - label: "generateObject", - }, - { - type: "doc", - id: "api/functions/generateObjectArray", - label: "generateObjectArray", - }, - { - type: "doc", - id: "api/functions/generateShouldRespond", - label: "generateShouldRespond", - }, - { - type: "doc", - id: "api/functions/generateText", - label: "generateText", - }, - { - type: "doc", - id: "api/functions/generateTextArray", - label: "generateTextArray", - }, - { - type: "doc", - id: "api/functions/generateTrueOrFalse", - label: "generateTrueOrFalse", - }, - { - type: "doc", - id: "api/functions/getActorDetails", - label: "getActorDetails", - }, - { type: "doc", id: "api/functions/getEndpoint", label: "getEndpoint" }, - { type: "doc", id: "api/functions/getGoals", label: "getGoals" }, - { - type: "doc", - id: "api/functions/getImageGenModel", - label: "getImageGenModel", - }, - { type: "doc", id: "api/functions/getModel", label: "getModel" }, - { - type: "doc", - id: "api/functions/getProviders", - label: "getProviders", - }, - { - type: "doc", - id: "api/functions/getRelationship", - label: "getRelationship", - }, - { - type: "doc", - id: "api/functions/getRelationships", - label: "getRelationships", - }, - { - type: "doc", - id: "api/functions/getTokenForProvider", - label: "getTokenForProvider", - }, - { - type: "doc", - id: "api/functions/initializeClients", - label: "initializeClients", - }, - { - type: "doc", - id: "api/functions/initializeDatabase", - label: "initializeDatabase", - }, - { - type: "doc", - id: "api/functions/isCreateAndBuyContent", - label: "isCreateAndBuyContent", - }, - { - type: "doc", - id: "api/functions/loadActionConfigs", - label: "loadActionConfigs", - }, - { - type: "doc", - id: "api/functions/loadCharacters", - label: "loadCharacters", - }, - { - type: "doc", - id: "api/functions/loadCustomActions", - label: "loadCustomActions", - }, - { - type: "doc", - id: "api/functions/parseArguments", - label: "parseArguments", - }, - { - type: "doc", - id: "api/functions/retrieveCachedEmbedding", - label: "retrieveCachedEmbedding", - }, - { type: "doc", id: "api/functions/sellToken", label: "sellToken" }, - { type: "doc", id: "api/functions/splitChunks", label: "splitChunks" }, - { - type: "doc", - id: "api/functions/startDiscord", - label: "startDiscord", - }, - { - type: "doc", - id: "api/functions/startTelegram", - label: "startTelegram", - }, - { - type: "doc", - id: "api/functions/startTwitter", - label: "startTwitter", - }, - { type: "doc", id: "api/functions/trimTokens", label: "trimTokens" }, - { type: "doc", id: "api/functions/updateGoal", label: "updateGoal" }, - ], - }, - ], -}; -module.exports = typedocSidebar.items; +const typedocSidebar = { items: [{"type":"category","label":"Enumerations","items":[{"type":"doc","id":"api/enumerations/Clients","label":"Clients"},{"type":"doc","id":"api/enumerations/GoalStatus","label":"GoalStatus"},{"type":"doc","id":"api/enumerations/ModelClass","label":"ModelClass"},{"type":"doc","id":"api/enumerations/ModelProviderName","label":"ModelProviderName"},{"type":"doc","id":"api/enumerations/ServiceType","label":"ServiceType"}]},{"type":"category","label":"Classes","items":[{"type":"doc","id":"api/classes/AgentRuntime","label":"AgentRuntime"},{"type":"doc","id":"api/classes/DatabaseAdapter","label":"DatabaseAdapter"},{"type":"doc","id":"api/classes/MemoryManager","label":"MemoryManager"},{"type":"doc","id":"api/classes/Service","label":"Service"}]},{"type":"category","label":"Interfaces","items":[{"type":"doc","id":"api/interfaces/Account","label":"Account"},{"type":"doc","id":"api/interfaces/Action","label":"Action"},{"type":"doc","id":"api/interfaces/ActionExample","label":"ActionExample"},{"type":"doc","id":"api/interfaces/Actor","label":"Actor"},{"type":"doc","id":"api/interfaces/Content","label":"Content"},{"type":"doc","id":"api/interfaces/ConversationExample","label":"ConversationExample"},{"type":"doc","id":"api/interfaces/EvaluationExample","label":"EvaluationExample"},{"type":"doc","id":"api/interfaces/Evaluator","label":"Evaluator"},{"type":"doc","id":"api/interfaces/Goal","label":"Goal"},{"type":"doc","id":"api/interfaces/IAgentRuntime","label":"IAgentRuntime"},{"type":"doc","id":"api/interfaces/IBrowserService","label":"IBrowserService"},{"type":"doc","id":"api/interfaces/IDatabaseAdapter","label":"IDatabaseAdapter"},{"type":"doc","id":"api/interfaces/IImageDescriptionService","label":"IImageDescriptionService"},{"type":"doc","id":"api/interfaces/IMemoryManager","label":"IMemoryManager"},{"type":"doc","id":"api/interfaces/IPdfService","label":"IPdfService"},{"type":"doc","id":"api/interfaces/ISpeechService","label":"ISpeechService"},{"type":"doc","id":"api/interfaces/ITextGenerationService","label":"ITextGenerationService"},{"type":"doc","id":"api/interfaces/ITranscriptionService","label":"ITranscriptionService"},{"type":"doc","id":"api/interfaces/IVideoService","label":"IVideoService"},{"type":"doc","id":"api/interfaces/Memory","label":"Memory"},{"type":"doc","id":"api/interfaces/MessageExample","label":"MessageExample"},{"type":"doc","id":"api/interfaces/Objective","label":"Objective"},{"type":"doc","id":"api/interfaces/Participant","label":"Participant"},{"type":"doc","id":"api/interfaces/Provider","label":"Provider"},{"type":"doc","id":"api/interfaces/Relationship","label":"Relationship"},{"type":"doc","id":"api/interfaces/Room","label":"Room"},{"type":"doc","id":"api/interfaces/State","label":"State"}]},{"type":"category","label":"Type Aliases","items":[{"type":"doc","id":"api/type-aliases/Character","label":"Character"},{"type":"doc","id":"api/type-aliases/Client","label":"Client"},{"type":"doc","id":"api/type-aliases/Handler","label":"Handler"},{"type":"doc","id":"api/type-aliases/HandlerCallback","label":"HandlerCallback"},{"type":"doc","id":"api/type-aliases/Media","label":"Media"},{"type":"doc","id":"api/type-aliases/Model","label":"Model"},{"type":"doc","id":"api/type-aliases/Models","label":"Models"},{"type":"doc","id":"api/type-aliases/Plugin","label":"Plugin"},{"type":"doc","id":"api/type-aliases/UUID","label":"UUID"},{"type":"doc","id":"api/type-aliases/Validator","label":"Validator"}]},{"type":"category","label":"Variables","items":[{"type":"doc","id":"api/variables/defaultCharacter","label":"defaultCharacter"},{"type":"doc","id":"api/variables/elizaLogger","label":"elizaLogger"},{"type":"doc","id":"api/variables/embeddingDimension","label":"embeddingDimension"},{"type":"doc","id":"api/variables/embeddingZeroVector","label":"embeddingZeroVector"},{"type":"doc","id":"api/variables/evaluationTemplate","label":"evaluationTemplate"},{"type":"doc","id":"api/variables/settings","label":"settings"}]},{"type":"category","label":"Functions","items":[{"type":"doc","id":"api/functions/addHeader","label":"addHeader"},{"type":"doc","id":"api/functions/composeActionExamples","label":"composeActionExamples"},{"type":"doc","id":"api/functions/composeContext","label":"composeContext"},{"type":"doc","id":"api/functions/createGoal","label":"createGoal"},{"type":"doc","id":"api/functions/createRelationship","label":"createRelationship"},{"type":"doc","id":"api/functions/embed","label":"embed"},{"type":"doc","id":"api/functions/findNearestEnvFile","label":"findNearestEnvFile"},{"type":"doc","id":"api/functions/formatActionNames","label":"formatActionNames"},{"type":"doc","id":"api/functions/formatActions","label":"formatActions"},{"type":"doc","id":"api/functions/formatActors","label":"formatActors"},{"type":"doc","id":"api/functions/formatEvaluatorExampleDescriptions","label":"formatEvaluatorExampleDescriptions"},{"type":"doc","id":"api/functions/formatEvaluatorExamples","label":"formatEvaluatorExamples"},{"type":"doc","id":"api/functions/formatEvaluatorNames","label":"formatEvaluatorNames"},{"type":"doc","id":"api/functions/formatEvaluators","label":"formatEvaluators"},{"type":"doc","id":"api/functions/formatGoalsAsString","label":"formatGoalsAsString"},{"type":"doc","id":"api/functions/formatMessages","label":"formatMessages"},{"type":"doc","id":"api/functions/formatPosts","label":"formatPosts"},{"type":"doc","id":"api/functions/formatRelationships","label":"formatRelationships"},{"type":"doc","id":"api/functions/formatTimestamp","label":"formatTimestamp"},{"type":"doc","id":"api/functions/generateCaption","label":"generateCaption"},{"type":"doc","id":"api/functions/generateImage","label":"generateImage"},{"type":"doc","id":"api/functions/generateMessageResponse","label":"generateMessageResponse"},{"type":"doc","id":"api/functions/generateObject","label":"generateObject"},{"type":"doc","id":"api/functions/generateObjectArray","label":"generateObjectArray"},{"type":"doc","id":"api/functions/generateShouldRespond","label":"generateShouldRespond"},{"type":"doc","id":"api/functions/generateText","label":"generateText"},{"type":"doc","id":"api/functions/generateTextArray","label":"generateTextArray"},{"type":"doc","id":"api/functions/generateTrueOrFalse","label":"generateTrueOrFalse"},{"type":"doc","id":"api/functions/getActorDetails","label":"getActorDetails"},{"type":"doc","id":"api/functions/getEndpoint","label":"getEndpoint"},{"type":"doc","id":"api/functions/getGoals","label":"getGoals"},{"type":"doc","id":"api/functions/getModel","label":"getModel"},{"type":"doc","id":"api/functions/getProviders","label":"getProviders"},{"type":"doc","id":"api/functions/getRelationship","label":"getRelationship"},{"type":"doc","id":"api/functions/getRelationships","label":"getRelationships"},{"type":"doc","id":"api/functions/loadEnvConfig","label":"loadEnvConfig"},{"type":"doc","id":"api/functions/retrieveCachedEmbedding","label":"retrieveCachedEmbedding"},{"type":"doc","id":"api/functions/splitChunks","label":"splitChunks"},{"type":"doc","id":"api/functions/trimTokens","label":"trimTokens"},{"type":"doc","id":"api/functions/updateGoal","label":"updateGoal"}]}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/docs/docs/api/variables/boredomProvider.md b/docs/docs/api/variables/boredomProvider.md deleted file mode 100644 index f9fdc3d727c..00000000000 --- a/docs/docs/api/variables/boredomProvider.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: boredomProvider - -> `const` **boredomProvider**: [`Provider`](../interfaces/Provider.md) - -## Defined in - -[core/src/providers/boredom.ts:275](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/boredom.ts#L275) diff --git a/docs/docs/api/variables/continueAction.md b/docs/docs/api/variables/continueAction.md deleted file mode 100644 index 030165236dd..00000000000 --- a/docs/docs/api/variables/continueAction.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: continueAction - -> `const` **continueAction**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/continue.ts:58](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/continue.ts#L58) diff --git a/docs/docs/api/variables/defaultActions.md b/docs/docs/api/variables/defaultActions.md deleted file mode 100644 index b283756741b..00000000000 --- a/docs/docs/api/variables/defaultActions.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: defaultActions - -> `const` **defaultActions**: [`Action`](../interfaces/Action.md)[] - -## Defined in - -[core/src/core/actions.ts:6](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/actions.ts#L6) diff --git a/docs/docs/api/variables/defaultCharacter.md b/docs/docs/api/variables/defaultCharacter.md index 58de13c19f4..3b34f4fdca7 100644 --- a/docs/docs/api/variables/defaultCharacter.md +++ b/docs/docs/api/variables/defaultCharacter.md @@ -4,4 +4,4 @@ ## Defined in -[core/src/core/defaultCharacter.ts:3](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/defaultCharacter.ts#L3) +[packages/core/src/defaultCharacter.ts:3](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/defaultCharacter.ts#L3) diff --git a/docs/docs/api/variables/defaultEvaluators.md b/docs/docs/api/variables/defaultEvaluators.md deleted file mode 100644 index 3d8953896dc..00000000000 --- a/docs/docs/api/variables/defaultEvaluators.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: defaultEvaluators - -> `const` **defaultEvaluators**: [`Evaluator`](../interfaces/Evaluator.md)[] - -## Defined in - -[core/src/core/evaluators.ts:7](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L7) diff --git a/docs/docs/api/variables/defaultProviders.md b/docs/docs/api/variables/defaultProviders.md deleted file mode 100644 index a7005af1763..00000000000 --- a/docs/docs/api/variables/defaultProviders.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: defaultProviders - -> `const` **defaultProviders**: [`Provider`](../interfaces/Provider.md)[] - -## Defined in - -[core/src/core/providers.ts:4](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/providers.ts#L4) diff --git a/docs/docs/api/variables/elizaLogger.md b/docs/docs/api/variables/elizaLogger.md index ffb378d63fa..a47dd2d3559 100644 --- a/docs/docs/api/variables/elizaLogger.md +++ b/docs/docs/api/variables/elizaLogger.md @@ -1,7 +1,7 @@ # Variable: elizaLogger -> `const` **elizaLogger**: `elizaLogger` +> `const` **elizaLogger**: `ElizaLogger` ## Defined in -[core/src/index.ts:12](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/index.ts#L12) +[packages/core/src/logger.ts:282](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/logger.ts#L282) diff --git a/docs/docs/api/variables/embeddingDimension.md b/docs/docs/api/variables/embeddingDimension.md index 1447d864ead..da564e2c142 100644 --- a/docs/docs/api/variables/embeddingDimension.md +++ b/docs/docs/api/variables/embeddingDimension.md @@ -4,4 +4,4 @@ ## Defined in -[core/src/core/memory.ts:9](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L9) +[packages/core/src/memory.ts:9](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L9) diff --git a/docs/docs/api/variables/embeddingZeroVector.md b/docs/docs/api/variables/embeddingZeroVector.md index 9101bd6332b..36461d3484d 100644 --- a/docs/docs/api/variables/embeddingZeroVector.md +++ b/docs/docs/api/variables/embeddingZeroVector.md @@ -4,4 +4,4 @@ ## Defined in -[core/src/core/memory.ts:10](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/memory.ts#L10) +[packages/core/src/memory.ts:10](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/memory.ts#L10) diff --git a/docs/docs/api/variables/evaluationTemplate.md b/docs/docs/api/variables/evaluationTemplate.md index 316b9d6be67..e324e3486f7 100644 --- a/docs/docs/api/variables/evaluationTemplate.md +++ b/docs/docs/api/variables/evaluationTemplate.md @@ -6,4 +6,4 @@ Template used for the evaluation generateText. ## Defined in -[core/src/core/evaluators.ts:12](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/evaluators.ts#L12) +[packages/core/src/evaluators.ts:8](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/evaluators.ts#L8) diff --git a/docs/docs/api/variables/executeSwap.md b/docs/docs/api/variables/executeSwap.md deleted file mode 100644 index 15018dafaaf..00000000000 --- a/docs/docs/api/variables/executeSwap.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: executeSwap - -> `const` **executeSwap**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/swap.ts:178](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/swap.ts#L178) diff --git a/docs/docs/api/variables/followRoom.md b/docs/docs/api/variables/followRoom.md deleted file mode 100644 index 37276e24ce0..00000000000 --- a/docs/docs/api/variables/followRoom.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: followRoom - -> `const` **followRoom**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/followRoom.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/followRoom.ts#L27) diff --git a/docs/docs/api/variables/ignore.md b/docs/docs/api/variables/ignore.md deleted file mode 100644 index 151124d7180..00000000000 --- a/docs/docs/api/variables/ignore.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: ignore - -> `const` **ignore**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/ignore.ts:8](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/ignore.ts#L8) diff --git a/docs/docs/api/variables/imageGenModels.md b/docs/docs/api/variables/imageGenModels.md deleted file mode 100644 index 7f38921b9ea..00000000000 --- a/docs/docs/api/variables/imageGenModels.md +++ /dev/null @@ -1,33 +0,0 @@ -# Variable: imageGenModels - -> `const` **imageGenModels**: `object` - -## Type declaration - -### Dalle - -> **Dalle**: `object` - -### Dalle.steps - -> **steps**: `number` = `0` - -### Dalle.subModel - -> **subModel**: `string` = `"dall-e-3"` - -### TogetherAI - -> **TogetherAI**: `object` - -### TogetherAI.steps - -> **steps**: `number` = `4` - -### TogetherAI.subModel - -> **subModel**: `string` = `"black-forest-labs/FLUX.1-schnell"` - -## Defined in - -[core/src/core/imageGenModels.ts:6](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/core/imageGenModels.ts#L6) diff --git a/docs/docs/api/variables/imageGeneration.md b/docs/docs/api/variables/imageGeneration.md deleted file mode 100644 index 2ca52ee544c..00000000000 --- a/docs/docs/api/variables/imageGeneration.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: imageGeneration - -> `const` **imageGeneration**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/imageGeneration.ts:11](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/imageGeneration.ts#L11) diff --git a/docs/docs/api/variables/messageHandlerTemplate.md b/docs/docs/api/variables/messageHandlerTemplate.md deleted file mode 100644 index cef7d99229a..00000000000 --- a/docs/docs/api/variables/messageHandlerTemplate.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: messageHandlerTemplate - -> `const` **messageHandlerTemplate**: `string` - -## Defined in - -[core/src/actions/continue.ts:20](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/continue.ts#L20) diff --git a/docs/docs/api/variables/muteRoom.md b/docs/docs/api/variables/muteRoom.md deleted file mode 100644 index e955e043758..00000000000 --- a/docs/docs/api/variables/muteRoom.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: muteRoom - -> `const` **muteRoom**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/muteRoom.ts:28](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/muteRoom.ts#L28) diff --git a/docs/docs/api/variables/none.md b/docs/docs/api/variables/none.md deleted file mode 100644 index 583c9f86f15..00000000000 --- a/docs/docs/api/variables/none.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: none - -> `const` **none**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/none.ts:8](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/none.ts#L8) diff --git a/docs/docs/api/variables/orderBookProvider.md b/docs/docs/api/variables/orderBookProvider.md deleted file mode 100644 index 1a727c6a829..00000000000 --- a/docs/docs/api/variables/orderBookProvider.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: orderBookProvider - -> `const` **orderBookProvider**: [`Provider`](../interfaces/Provider.md) - -## Defined in - -[core/src/providers/orderBook.ts:14](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/orderBook.ts#L14) diff --git a/docs/docs/api/variables/settings.md b/docs/docs/api/variables/settings.md new file mode 100644 index 00000000000..6c08bf623ae --- /dev/null +++ b/docs/docs/api/variables/settings.md @@ -0,0 +1,7 @@ +# Variable: settings + +> `const` **settings**: `ProcessEnv` + +## Defined in + +[packages/core/src/settings.ts:54](https://github.com/ai16z/eliza/blob/7fcf54e7fb2ba027d110afcc319c0b01b3f181dc/packages/core/src/settings.ts#L54) diff --git a/docs/docs/api/variables/shouldContinueTemplate.md b/docs/docs/api/variables/shouldContinueTemplate.md deleted file mode 100644 index a6f189eb0b3..00000000000 --- a/docs/docs/api/variables/shouldContinueTemplate.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: shouldContinueTemplate - -> `const` **shouldContinueTemplate**: `string` - -## Defined in - -[core/src/actions/continue.ts:47](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/continue.ts#L47) diff --git a/docs/docs/api/variables/shouldFollowTemplate.md b/docs/docs/api/variables/shouldFollowTemplate.md deleted file mode 100644 index 682da6f91ba..00000000000 --- a/docs/docs/api/variables/shouldFollowTemplate.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: shouldFollowTemplate - -> `const` **shouldFollowTemplate**: `string` - -## Defined in - -[core/src/actions/followRoom.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/followRoom.ts#L13) diff --git a/docs/docs/api/variables/shouldMuteTemplate.md b/docs/docs/api/variables/shouldMuteTemplate.md deleted file mode 100644 index c999f23e561..00000000000 --- a/docs/docs/api/variables/shouldMuteTemplate.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: shouldMuteTemplate - -> `const` **shouldMuteTemplate**: `string` - -## Defined in - -[core/src/actions/muteRoom.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/muteRoom.ts#L13) diff --git a/docs/docs/api/variables/shouldUnmuteTemplate.md b/docs/docs/api/variables/shouldUnmuteTemplate.md deleted file mode 100644 index e69a5fc9aaa..00000000000 --- a/docs/docs/api/variables/shouldUnmuteTemplate.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: shouldUnmuteTemplate - -> `const` **shouldUnmuteTemplate**: `string` - -## Defined in - -[core/src/actions/unmuteRoom.ts:13](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/unmuteRoom.ts#L13) diff --git a/docs/docs/api/variables/timeProvider.md b/docs/docs/api/variables/timeProvider.md deleted file mode 100644 index 495451cd21c..00000000000 --- a/docs/docs/api/variables/timeProvider.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: timeProvider - -> `const` **timeProvider**: [`Provider`](../interfaces/Provider.md) - -## Defined in - -[core/src/providers/time.ts:3](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/time.ts#L3) diff --git a/docs/docs/api/variables/tokenProvider.md b/docs/docs/api/variables/tokenProvider.md deleted file mode 100644 index f2af9a6a8bb..00000000000 --- a/docs/docs/api/variables/tokenProvider.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: tokenProvider - -> `const` **tokenProvider**: [`Provider`](../interfaces/Provider.md) - -## Defined in - -[core/src/providers/token.ts:801](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/token.ts#L801) diff --git a/docs/docs/api/variables/unfollowRoom.md b/docs/docs/api/variables/unfollowRoom.md deleted file mode 100644 index a35743195c4..00000000000 --- a/docs/docs/api/variables/unfollowRoom.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: unfollowRoom - -> `const` **unfollowRoom**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/unfollowRoom.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/unfollowRoom.ts#L27) diff --git a/docs/docs/api/variables/unmuteRoom.md b/docs/docs/api/variables/unmuteRoom.md deleted file mode 100644 index 95fd4dabbe3..00000000000 --- a/docs/docs/api/variables/unmuteRoom.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: unmuteRoom - -> `const` **unmuteRoom**: [`Action`](../interfaces/Action.md) - -## Defined in - -[core/src/actions/unmuteRoom.ts:27](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/actions/unmuteRoom.ts#L27) diff --git a/docs/docs/api/variables/walletProvider.md b/docs/docs/api/variables/walletProvider.md deleted file mode 100644 index 32f4688f60c..00000000000 --- a/docs/docs/api/variables/walletProvider.md +++ /dev/null @@ -1,7 +0,0 @@ -# Variable: walletProvider - -> `const` **walletProvider**: [`Provider`](../interfaces/Provider.md) - -## Defined in - -[core/src/providers/wallet.ts:244](https://github.com/ai16z/eliza/blob/c96957e5a5d17e343b499dd4d46ce403856ac5bc/core/src/providers/wallet.ts#L244) diff --git a/package.json b/package.json index 1d971e65588..5fcc7837312 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ } }, "engines": { - "node": ">=22" + "node": ">=23" }, "dependencies": { "ollama-ai-provider": "^0.16.1", diff --git a/packages/agent/src/index.ts b/packages/agent/src/index.ts index a82a05894b2..3c773fc29e9 100644 --- a/packages/agent/src/index.ts +++ b/packages/agent/src/index.ts @@ -145,6 +145,11 @@ export function getTokenForProvider( character.settings?.secrets?.OPENROUTER || settings.OPENROUTER_API_KEY ); + case ModelProviderName.GROK: + return ( + character.settings?.secrets?.GROK_API_KEY || + settings.GROK_API_KEY + ); } } @@ -223,9 +228,7 @@ export async function createAgent( plugins: [ bootstrapPlugin, nodePlugin, - character.settings.secrets?.WALLET_PUBLIC_KEY - ? solanaPlugin - : null + character.settings.secrets?.WALLET_PUBLIC_KEY ? solanaPlugin : null, ].filter(Boolean), providers: [], actions: [], @@ -303,7 +306,6 @@ const rl = readline.createInterface({ }); async function handleUserInput(input, agentId) { - console.log("handleUserInput", input, agentId); if (input.toLowerCase() === "exit") { rl.close(); return; diff --git a/packages/client-direct/src/index.ts b/packages/client-direct/src/index.ts index 66376a576c6..2f28f05bdbd 100644 --- a/packages/client-direct/src/index.ts +++ b/packages/client-direct/src/index.ts @@ -129,7 +129,6 @@ export class DirectClient { this.app.post( "/:agentId/message", async (req: express.Request, res: express.Response) => { - console.log("DirectClient message"); const agentId = req.params.agentId; const roomId = stringToUuid( req.body.roomId ?? "default-room-" + agentId diff --git a/packages/client-discord/src/actions/download_media.ts b/packages/client-discord/src/actions/download_media.ts index 90edac1737a..48a69117cc9 100644 --- a/packages/client-discord/src/actions/download_media.ts +++ b/packages/client-discord/src/actions/download_media.ts @@ -10,6 +10,7 @@ import { IVideoService, Memory, ModelClass, + Service, ServiceType, State, } from "@ai16z/eliza/src/types.ts"; @@ -85,9 +86,9 @@ export default { options: any, callback: HandlerCallback ) => { - const videoService = runtime.getService( - ServiceType.VIDEO - ); + const videoService = runtime + .getService(ServiceType.VIDEO) + .getInstance(); if (!state) { state = (await runtime.composeState(message)) as State; } diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index 4b6e7ba5e5a..15c03164bb4 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -8,6 +8,7 @@ import { IVideoService, Media, ModelClass, + Service, ServiceType, } from "@ai16z/eliza/src/types.ts"; import { Attachment, Collection } from "discord.js"; @@ -102,8 +103,8 @@ export class AttachmentManager { media = await this.processImageAttachment(attachment); } else if ( attachment.contentType?.startsWith("video/") || - this.runtime - .getService(ServiceType.VIDEO) + this.runtime.getService(ServiceType.VIDEO) + .getInstance() .isVideoUrl(attachment.url) ) { media = await this.processVideoAttachment(attachment); @@ -136,7 +137,8 @@ export class AttachmentManager { } const transcription = await this.runtime - .getService(ServiceType.TRANSCRIPTION) + .getService(ServiceType.TRANSCRIPTION) + .getInstance() .transcribeAttachment(audioBuffer); const { title, description } = await generateSummary( this.runtime, @@ -217,7 +219,8 @@ export class AttachmentManager { const response = await fetch(attachment.url); const pdfBuffer = await response.arrayBuffer(); const text = await this.runtime - .getService(ServiceType.PDF) + .getService(ServiceType.PDF) + .getInstance() .convertPdfToText(Buffer.from(pdfBuffer)); const { title, description } = await generateSummary( this.runtime, @@ -285,9 +288,8 @@ export class AttachmentManager { ): Promise { try { const { description, title } = await this.runtime - .getService( - ServiceType.IMAGE_DESCRIPTION - ) + .getService(ServiceType.IMAGE_DESCRIPTION) + .getInstance() .describeImage(attachment.url); return { id: attachment.id, @@ -321,11 +323,13 @@ export class AttachmentManager { ): Promise { if ( this.runtime - .getService(ServiceType.VIDEO) + .getService(ServiceType.VIDEO) + .getInstance() .isVideoUrl(attachment.url) ) { const videoInfo = await this.runtime - .getService(ServiceType.VIDEO) + .getService(ServiceType.VIDEO) + .getInstance() .processVideo(attachment.url); return { id: attachment.id, diff --git a/packages/client-discord/src/index.ts b/packages/client-discord/src/index.ts index eda359bae03..f1577f21f96 100644 --- a/packages/client-discord/src/index.ts +++ b/packages/client-discord/src/index.ts @@ -73,6 +73,7 @@ export class DiscordClient extends EventEmitter { this.runtime.registerAction(transcribe_media); this.runtime.registerAction(download_media); + this.runtime.providers.push(channelStateProvider); this.runtime.providers.push(voiceStateProvider); } diff --git a/packages/client-discord/src/messages.ts b/packages/client-discord/src/messages.ts index 349f57160b8..4d233f658de 100644 --- a/packages/client-discord/src/messages.ts +++ b/packages/client-discord/src/messages.ts @@ -36,6 +36,7 @@ import { import { elizaLogger } from "@ai16z/eliza/src/logger.ts"; import { AttachmentManager } from "./attachments.ts"; import { VoiceManager } from "./voice.ts"; +import { Service } from "@ai16z/eliza"; const MAX_MESSAGE_LENGTH = 1900; async function generateSummary( @@ -340,7 +341,7 @@ export class MessageManager { if ( message.interaction || message.author.id === - this.client.user?.id /* || message.author?.bot*/ + this.client.user?.id /* || message.author?.bot*/ ) return; const userId = message.author.id as UUID; @@ -388,10 +389,10 @@ export class MessageManager { url: message.url, inReplyTo: message.reference?.messageId ? stringToUuid( - message.reference.messageId + - "-" + - this.runtime.agentId - ) + message.reference.messageId + + "-" + + this.runtime.agentId + ) : undefined, }; @@ -502,10 +503,11 @@ export class MessageManager { } if (message.channel.type === ChannelType.GuildVoice) { // For voice channels, use text-to-speech - const audioStream = await this.runtime - .getService( + const audioStream = await ( + this.runtime.getService( ServiceType.SPEECH_GENERATION ) + ).getInstance() .generate(this.runtime, content.text); await this.voiceManager.playAudioStream( userId, @@ -592,7 +594,8 @@ export class MessageManager { // For voice channels, use text-to-speech for the error message const errorMessage = "Sorry, I had a glitch. What was that?"; const audioStream = await this.runtime - .getService(ServiceType.SPEECH_GENERATION) + .getService(ServiceType.SPEECH_GENERATION) + .getInstance() .generate(this.runtime, errorMessage); await this.voiceManager.playAudioStream(userId, audioStream); } else { @@ -656,13 +659,14 @@ export class MessageManager { for (const url of urls) { if ( - this.runtime - .getService(ServiceType.VIDEO) + this.runtime.getService(ServiceType.VIDEO) + .getInstance() .isVideoUrl(url) ) { - const videoInfo = await this.runtime - .getService(ServiceType.VIDEO) - .processVideo(url); + const videoInfo = await (this.runtime + .getService(ServiceType.VIDEO) + .getInstance() + .processVideo(url)); attachments.push({ id: `youtube-${Date.now()}`, url: url, @@ -673,7 +677,8 @@ export class MessageManager { }); } else { const { title, bodyContent } = await this.runtime - .getService(ServiceType.BROWSER) + .getService(ServiceType.BROWSER) + .getInstance() .getPageContent(url, this.runtime); const { title: newTitle, description } = await generateSummary( this.runtime, diff --git a/packages/client-discord/src/voice.ts b/packages/client-discord/src/voice.ts index 6098592592f..744a8106b8e 100644 --- a/packages/client-discord/src/voice.ts +++ b/packages/client-discord/src/voice.ts @@ -31,6 +31,7 @@ import { ITranscriptionService, Memory, ModelClass, + Service, ServiceType, State, UUID, @@ -399,9 +400,8 @@ export class VoiceManager extends EventEmitter { console.log("starting transcription"); const text = await this.runtime - .getService( - ServiceType.TRANSCRIPTION - ) + .getService(ServiceType.TRANSCRIPTION) + .getInstance() .transcribe(wavBuffer); console.log("transcribed text: ", text); transcriptionText += text; @@ -541,9 +541,8 @@ export class VoiceManager extends EventEmitter { state ); const responseStream = await this.runtime - .getService( - ServiceType.SPEECH_GENERATION - ) + .getService(ServiceType.SPEECH_GENERATION) + .getInstance() .generate(this.runtime, content.text); if (responseStream) { diff --git a/packages/client-telegram/src/index.ts b/packages/client-telegram/src/index.ts index ccbd7138864..44e2432169e 100644 --- a/packages/client-telegram/src/index.ts +++ b/packages/client-telegram/src/index.ts @@ -6,6 +6,8 @@ export const TelegramClientInterface: Client = { start: async (runtime: IAgentRuntime) => { const botToken = runtime.getSetting("TELEGRAM_BOT_TOKEN"); const tg = new TelegramClient(runtime, botToken); + await tg.start(); + elizaLogger.success( `✅ Telegram client successfully started for character ${runtime.character.name}` ); @@ -16,4 +18,4 @@ export const TelegramClientInterface: Client = { }, }; -export default TelegramClientInterface; +export default TelegramClientInterface; \ No newline at end of file diff --git a/packages/client-telegram/src/messageManager.ts b/packages/client-telegram/src/messageManager.ts index 0dd1e121fc3..981553037f9 100644 --- a/packages/client-telegram/src/messageManager.ts +++ b/packages/client-telegram/src/messageManager.ts @@ -130,7 +130,7 @@ Note that {{agentName}} is capable of reading/seeing/hearing various forms of me ` + messageCompletionFooter; export class MessageManager { - private bot: Telegraf; + public bot: Telegraf; private runtime: IAgentRuntime; private imageService: IImageDescriptionService; @@ -482,4 +482,4 @@ export class MessageManager { console.error("Error sending message:", error); } } -} +} \ No newline at end of file diff --git a/packages/client-telegram/src/telegramClient.ts b/packages/client-telegram/src/telegramClient.ts index 6d729746d65..28e3bde1302 100644 --- a/packages/client-telegram/src/telegramClient.ts +++ b/packages/client-telegram/src/telegramClient.ts @@ -15,39 +15,6 @@ export class TelegramClient { this.bot = new Telegraf(botToken); this.messageManager = new MessageManager(this.bot, this.runtime); - elizaLogger.log("Setting up message handler..."); - this.bot.on("message", async (ctx) => { - try { - elizaLogger.log("📥 Received message:", ctx.message); - await this.messageManager.handleMessage(ctx); - } catch (error) { - elizaLogger.error("❌ Error handling message:", error); - await ctx.reply( - "An error occurred while processing your message." - ); - } - }); - - // Handle specific message types for better logging - this.bot.on("photo", (ctx) => { - elizaLogger.log( - "📸 Received photo message with caption:", - ctx.message.caption - ); - }); - - this.bot.on("document", (ctx) => { - elizaLogger.log( - "📎 Received document message:", - ctx.message.document.file_name - ); - }); - - this.bot.catch((err, ctx) => { - elizaLogger.error(`❌ Telegram Error for ${ctx.updateType}:`, err); - ctx.reply("An unexpected error occurred. Please try again later."); - }); - elizaLogger.log("✅ TelegramClient constructor completed"); } @@ -60,7 +27,51 @@ export class TelegramClient { elizaLogger.log( "✨ Telegram bot successfully launched and is running!" ); - elizaLogger.log(`Bot username: @${this.bot.botInfo?.username}`); + + await this.bot.telegram.getMe().then((botInfo) => { + this.bot.botInfo = botInfo; + }); + + console.log(`Bot username: @${this.bot.botInfo?.username}`); + + this.messageManager.bot = this.bot; + + // Include if you want to view message maanger bot info + // console.log(`Message Manager bot info: @${this.messageManager.bot}`); + + elizaLogger.log("Setting up message handler..."); + + this.bot.on("message", async (ctx) => { + try { + console.log("📥 Received message:", ctx.message); + await this.messageManager.handleMessage(ctx); + } catch (error) { + elizaLogger.error("❌ Error handling message:", error); + await ctx.reply( + "An error occurred while processing your message." + ); + } + }); + + // Handle specific message types for better logging + this.bot.on("photo", (ctx) => { + elizaLogger.log( + "📸 Received photo message with caption:", + ctx.message.caption + ); + }); + + this.bot.on("document", (ctx) => { + elizaLogger.log( + "📎 Received document message:", + ctx.message.document.file_name + ); + }); + + this.bot.catch((err, ctx) => { + elizaLogger.error(`❌ Telegram Error for ${ctx.updateType}:`, err); + ctx.reply("An unexpected error occurred. Please try again later."); + }); // Graceful shutdown handlers const shutdownHandler = async (signal: string) => { @@ -93,4 +104,4 @@ export class TelegramClient { await this.bot.stop(); elizaLogger.log("Telegram bot stopped"); } -} +} \ No newline at end of file diff --git a/packages/client-twitter/src/base.ts b/packages/client-twitter/src/base.ts index 9279816ea7b..12adf70eda1 100644 --- a/packages/client-twitter/src/base.ts +++ b/packages/client-twitter/src/base.ts @@ -218,7 +218,8 @@ export class ClientBase extends EventEmitter { await this.twitterClient.login( this.runtime.getSetting("TWITTER_USERNAME"), this.runtime.getSetting("TWITTER_PASSWORD"), - this.runtime.getSetting("TWITTER_EMAIL") + this.runtime.getSetting("TWITTER_EMAIL"), + this.runtime.getSetting("TWITTER_2FA_SECRET") ); console.log("Logged in to Twitter"); const cookies = await this.twitterClient.getCookies(); @@ -240,7 +241,8 @@ export class ClientBase extends EventEmitter { await this.twitterClient.login( this.runtime.getSetting("TWITTER_USERNAME"), this.runtime.getSetting("TWITTER_PASSWORD"), - this.runtime.getSetting("TWITTER_EMAIL") + this.runtime.getSetting("TWITTER_EMAIL"), + this.runtime.getSetting("TWITTER_2FA_SECRET") ); const cookies = await this.twitterClient.getCookies(); @@ -258,7 +260,7 @@ export class ClientBase extends EventEmitter { await new Promise((resolve) => setTimeout(resolve, 10000)); try { return await this.twitterClient.getUserIdByScreenName( - this.runtime.getSetting("TWITTER_USERNAME") + this.runtime.getSetting("TWITTER_USERNAME"), ); } catch (error) { console.error("Error getting user ID:", error); diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 055aae2de35..d4e9421855c 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -33,8 +33,8 @@ export class TwitterPostClient extends ClientBase { this.generateNewTweet(); setTimeout( generateNewTweetLoop, - (Math.floor(Math.random() * (20 - 2 + 1)) + 2) * 60 * 1000 - ); // Random interval between 4-8 hours + (Math.floor(Math.random() * (4 - 1 + 1)) + 1) * 60 * 60 * 1000 + ); // Random interval between 1 and 4 hours }; // setTimeout(() => { generateNewTweetLoop(); diff --git a/packages/client-twitter/src/search.ts b/packages/client-twitter/src/search.ts index 8ac4c88bf13..0a387932001 100644 --- a/packages/client-twitter/src/search.ts +++ b/packages/client-twitter/src/search.ts @@ -237,9 +237,8 @@ export class TwitterSearchClient extends ClientBase { const imageDescriptions = []; for (const photo of selectedTweet.photos) { const description = await this.runtime - .getService( - ServiceType.IMAGE_DESCRIPTION - ) + .getService(ServiceType.IMAGE_DESCRIPTION) + .getInstance() .describeImage(photo.url); imageDescriptions.push(description); } diff --git a/packages/core/src/embedding.ts b/packages/core/src/embedding.ts index 13bd64f5081..e2125588750 100644 --- a/packages/core/src/embedding.ts +++ b/packages/core/src/embedding.ts @@ -97,8 +97,6 @@ export async function embed(runtime: IAgentRuntime, input: string) { throw new Error("No embedding model configured"); } - console.log("embeddingModel", embeddingModel); - // Try local embedding first if ( runtime.character.modelProvider !== ModelProviderName.OPENAI && diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index dc01e535e13..07909847b21 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -2,7 +2,7 @@ import { createAnthropic } from "@ai-sdk/anthropic"; import { createGroq } from "@ai-sdk/groq"; import { createOpenAI } from "@ai-sdk/openai"; import { getModel } from "./models.ts"; -import { IImageDescriptionService, ModelClass } from "./types.ts"; +import { IImageDescriptionService, ModelClass, Service } from "./types.ts"; import { generateText as aiGenerateText } from "ai"; import { Buffer } from "buffer"; import { createOllama } from "ollama-ai-provider"; @@ -199,9 +199,8 @@ export async function generateText({ "Using local Llama model for text completion." ); response = await runtime - .getService( - ServiceType.TEXT_GENERATION - ) + .getService(ServiceType.TEXT_GENERATION) + .getInstance() .queueTextCompletion( context, temperature, @@ -741,7 +740,8 @@ export const generateCaption = async ( }> => { const { imageUrl } = data; const resp = await runtime - .getService(ServiceType.IMAGE_DESCRIPTION) + .getService(ServiceType.IMAGE_DESCRIPTION) + .getInstance() .describeImage(imageUrl); return { title: resp.title.trim(), diff --git a/packages/core/src/memory.ts b/packages/core/src/memory.ts index 298c17543d6..6187e536a75 100644 --- a/packages/core/src/memory.ts +++ b/packages/core/src/memory.ts @@ -159,8 +159,6 @@ export class MemoryManager implements IMemoryManager { const existingMessage = await this.runtime.databaseAdapter.getMemoryById(memory.id); - console.log("existingMessage", existingMessage); - if (existingMessage) { console.log("Memory already exists, skipping"); return; diff --git a/packages/core/src/models.ts b/packages/core/src/models.ts index 21b80e15eb7..e120551efd8 100644 --- a/packages/core/src/models.ts +++ b/packages/core/src/models.ts @@ -59,7 +59,7 @@ const models: Models = { maxOutputTokens: 8192, frequency_penalty: 0.0, presence_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, endpoint: "https://api.x.ai/v1", model: { @@ -77,7 +77,7 @@ const models: Models = { maxOutputTokens: 8000, frequency_penalty: 0.0, presence_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, model: { [ModelClass.SMALL]: "llama-3.1-8b-instant", @@ -92,7 +92,7 @@ const models: Models = { maxInputTokens: 128000, maxOutputTokens: 8192, repetition_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, imageSettings: { steps: 4, @@ -113,7 +113,7 @@ const models: Models = { maxInputTokens: 32768, maxOutputTokens: 8192, repetition_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, model: { [ModelClass.SMALL]: @@ -134,7 +134,7 @@ const models: Models = { maxOutputTokens: 8192, frequency_penalty: 0.0, presence_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, model: { [ModelClass.SMALL]: "gemini-1.5-flash-latest", @@ -197,7 +197,7 @@ const models: Models = { maxOutputTokens: 8192, frequency_penalty: 0.0, presence_penalty: 0.0, - temperature: 0.3, + temperature: 0.7, }, endpoint: settings.OLLAMA_SERVER_URL || "http://localhost:11434", model: { diff --git a/packages/core/src/runtime.ts b/packages/core/src/runtime.ts index 0beb43a8488..5e5fd5891d7 100644 --- a/packages/core/src/runtime.ts +++ b/packages/core/src/runtime.ts @@ -150,13 +150,13 @@ export class AgentRuntime implements IAgentRuntime { return this.memoryManagers.get(tableName) || null; } - getService(service: ServiceType): T | null { + getService(service: ServiceType): typeof Service | null { const serviceInstance = this.services.get(service); if (!serviceInstance) { console.error(`Service ${service} not found`); return null; } - return serviceInstance as T; + return serviceInstance as typeof Service; } registerService(service: Service): void { const serviceType = (service as typeof Service).serviceType; @@ -499,7 +499,6 @@ export class AgentRuntime implements IAgentRuntime { * @returns The results of the evaluation. */ async evaluate(message: Memory, state?: State, didRespond?: boolean) { - console.log("Evaluate: ", didRespond); const evaluatorPromises = this.evaluators.map( async (evaluator: Evaluator) => { console.log("Evaluating", evaluator.name); @@ -897,8 +896,6 @@ Text: ${attachment.text} async function getKnowledge(runtime: AgentRuntime, message: Memory): Promise { const embedding = await embed(runtime, message.content.text); - console.log("message.agentId", message.agentId) - const memories = await runtime.knowledgeManager.searchMemoriesByEmbedding( embedding, { diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 7d61a241f54..040b743a68c 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -536,7 +536,7 @@ export interface IAgentRuntime { getMemoryManager(name: string): IMemoryManager | null; - getService(service: string): Service | null; + getService(service: string): typeof Service | null; registerService(service: Service): void; diff --git a/packages/plugin-bootstrap/src/providers/facts.ts b/packages/plugin-bootstrap/src/providers/facts.ts index e335f1baf78..241e5818541 100644 --- a/packages/plugin-bootstrap/src/providers/facts.ts +++ b/packages/plugin-bootstrap/src/providers/facts.ts @@ -20,9 +20,6 @@ const factsProvider: Provider = { const embedding = await embed(runtime, recentMessages); - console.log("embedding", embedding); - console.log("embedding length", embedding.length); - const memoryManager = new MemoryManager({ runtime, tableName: "facts", diff --git a/packages/plugin-image-generation/src/index.ts b/packages/plugin-image-generation/src/index.ts index 22aa577ed81..e05c779832f 100644 --- a/packages/plugin-image-generation/src/index.ts +++ b/packages/plugin-image-generation/src/index.ts @@ -9,9 +9,34 @@ import { } from "@ai16z/eliza/src/types.ts"; import { generateCaption, generateImage } from "@ai16z/eliza/src/generation.ts"; +import fs from 'fs'; +import path from 'path'; + +export function saveBase64Image(base64Data: string, filename: string): string { + // Create generatedImages directory if it doesn't exist + const imageDir = path.join(process.cwd(), 'generatedImages'); + if (!fs.existsSync(imageDir)) { + fs.mkdirSync(imageDir, { recursive: true }); + } + + // Remove the data:image/png;base64 prefix if it exists + const base64Image = base64Data.replace(/^data:image\/\w+;base64,/, ''); + + // Create a buffer from the base64 string + const imageBuffer = Buffer.from(base64Image, 'base64'); + + // Create full file path + const filepath = path.join(imageDir, `${filename}.png`); + + // Save the file + fs.writeFileSync(filepath, imageBuffer); + + return filepath; +} + const imageGeneration: Action = { name: "GENERATE_IMAGE", - similes: ["IMAGE_GENERATION", "IMAGE_GEN", "CREATE_IMAGE", "MAKE_PICTURE"], + similes: ["IMAGE_GENERATION", "IMAGE_GEN", "CREATE_IMAGE", "MAKE_PICTURE",], description: "Generate an image to go along with the message.", validate: async (runtime: IAgentRuntime, message: Memory) => { const anthropicApiKeyOk = !!runtime.getSetting("ANTHROPIC_API_KEY"); @@ -58,36 +83,62 @@ const imageGeneration: Action = { ); for (let i = 0; i < images.data.length; i++) { const image = images.data[i]; - elizaLogger.log(`Processing image ${i + 1}:`, image); + + const base64Image = images.data[i]; + // Save the image and get filepath + const filename = `generated_${Date.now()}_${i}`; + const filepath = saveBase64Image(base64Image, filename); + elizaLogger.log(`Processing image ${i + 1}:`, filename); - const caption = await generateCaption( + //just dont even add a caption or a description just have it generate & send + /* + try { + const imageService = runtime.getService(ServiceType.IMAGE_DESCRIPTION); + if (imageService && typeof imageService.describeImage === 'function') { + const caption = await imageService.describeImage({ imageUrl: filepath }); + captionText = caption.description; + captionTitle = caption.title; + } + } catch (error) { + elizaLogger.error("Caption generation failed, using default caption:", error); + }*/ + + const caption = "..."; + /*= await generateCaption( { imageUrl: image, }, runtime - ); + );*/ + + res.push({ image: filepath, caption: "..."});//caption.title }); elizaLogger.log( `Generated caption for image ${i + 1}:`, - caption.title + "..."//caption.title ); - res.push({ image: image, caption: caption.title }); + //res.push({ image: image, caption: caption.title }); callback( { - text: caption.description, + text: "...",//caption.description, attachments: [ { id: crypto.randomUUID(), - url: image, + url: filepath, title: "Generated image", source: "imageGeneration", - description: caption.title, - text: caption.description, + description: "...",//caption.title, + text: "...",//caption.description, }, ], }, - [] + [ + { + attachment: filepath, + name: `${filename}.png` + } + ] ); } } else { diff --git a/packages/plugin-node/src/services/video.ts b/packages/plugin-node/src/services/video.ts index 6e1ef6fe461..6aa1b91e52e 100644 --- a/packages/plugin-node/src/services/video.ts +++ b/packages/plugin-node/src/services/video.ts @@ -328,7 +328,8 @@ export class VideoService extends Service { console.log("Starting transcription..."); const startTime = Date.now(); const transcript = await runtime - .getService(ServiceType.TRANSCRIPTION) + .getService(ServiceType.TRANSCRIPTION) + .getInstance() .transcribe(audioBuffer); const endTime = Date.now(); console.log( diff --git a/packages/plugin-solana/src/actions/pumpfun.ts b/packages/plugin-solana/src/actions/pumpfun.ts index a6453cbc631..ab49821ee08 100644 --- a/packages/plugin-solana/src/actions/pumpfun.ts +++ b/packages/plugin-solana/src/actions/pumpfun.ts @@ -1,5 +1,6 @@ import { AnchorProvider } from "@coral-xyz/anchor"; import { Wallet } from "@coral-xyz/anchor"; +import { generateImage } from "@ai16z/eliza/src/generation.ts"; import { Connection, Keypair, PublicKey } from "@solana/web3.js"; import { CreateTokenMetadata, @@ -14,40 +15,53 @@ import settings from "@ai16z/eliza/src/settings.ts"; import { ActionExample, Content, + HandlerCallback, IAgentRuntime, Memory, + ModelClass, + State, type Action, } from "@ai16z/eliza/src/types.ts"; +import { composeContext } from "@ai16z/eliza/src/context.ts"; +import { generateObject } from "@ai16z/eliza/src/generation.ts"; + +import { + walletProvider, + //WalletProvider, +} from "../providers/wallet.ts"; + +import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes/index.js"; + export interface CreateAndBuyContent extends Content { - deployerPrivateKey: string; - tokenMetadata: CreateTokenMetadata; - buyAmountSol: string | number; - priorityFee: { - unitLimit: number; - unitPrice: number; + tokenMetadata: { + name: string; + symbol: string; + description: string; + image_description: string; }; - allowOffCurve: boolean; + buyAmountSol: string | number; } + export function isCreateAndBuyContent( runtime: IAgentRuntime, content: any ): content is CreateAndBuyContent { + console.log("Content for create & buy", content) return ( - typeof content.deployerPrivateKey === "string" && typeof content.tokenMetadata === "object" && content.tokenMetadata !== null && + typeof content.tokenMetadata.name === "string" && + typeof content.tokenMetadata.symbol === "string" && + typeof content.tokenMetadata.description === "string" && + typeof content.tokenMetadata.image_description === "string" && (typeof content.buyAmountSol === "string" || - typeof content.buyAmountSol === "number") && - typeof content.priorityFee === "object" && - content.priorityFee !== null && - typeof content.priorityFee.unitLimit === "number" && - typeof content.priorityFee.unitPrice === "number" && - typeof content.allowOffCurve === "boolean" + typeof content.buyAmountSol === "number") ); } + export const createAndBuyToken = async ({ deployer, mint, @@ -88,6 +102,9 @@ export const createAndBuyToken = async ({ priorityFee, commitment ); + + console.log("Create Results: ", createResults); + if (createResults.success) { console.log( "Success:", @@ -111,9 +128,21 @@ export const createAndBuyToken = async ({ } else { console.log(`${deployer.publicKey.toBase58()}:`, amount); } + + return { + success: true, + ca: mint.publicKey.toBase58(), + creator: deployer.publicKey.toBase58() + }; + } else { console.log("Create and Buy failed"); - } + return { + success: false, + ca: mint.publicKey.toBase58(), + error: createResults.error || "Transaction failed" + }; + } }; export const buyToken = async ({ @@ -213,6 +242,7 @@ export const sellToken = async ({ }; const promptConfirmation = async (): Promise => { + return true; if (typeof window !== "undefined" && typeof window.confirm === "function") { return window.confirm( "Confirm the creation and purchase of the token?" @@ -221,76 +251,247 @@ const promptConfirmation = async (): Promise => { return true; }; +// Save the base64 data to a file +import * as fs from 'fs'; +import * as path from 'path'; + + +const pumpfunTemplate = `Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined. + +Example response: +\`\`\`json +{ + "tokenMetadata": { + "name": "Test Token", + "symbol": "TEST", + "description": "A test token", + "image_description": "create an image of a rabbit" + }, + "buyAmountSol": "0.00069" +} +\`\`\` + +{{recentMessages}} + +Given the recent messages, extract or generate (come up with if not included) the following information about the requested token creation: +- Token name +- Token symbol +- Token description +- Token image description +- Amount of SOL to buy + +Respond with a JSON markdown block containing only the extracted values.`; + + + export default { name: "CREATE_AND_BUY_TOKEN", similes: ["CREATE_AND_PURCHASE_TOKEN", "DEPLOY_AND_BUY_TOKEN"], validate: async (runtime: IAgentRuntime, message: Memory) => { - return isCreateAndBuyContent(runtime, message.content); + + return true;//return isCreateAndBuyContent(runtime, message.content); }, description: "Create a new token and buy a specified amount using SOL. Requires deployer private key, token metadata, buy amount in SOL, priority fee, and allowOffCurve flag.", - handler: async ( - runtime: IAgentRuntime, - message: Memory - ): Promise => { - const content = message.content; - if (!isCreateAndBuyContent(runtime, content)) { - console.error("Invalid content for CREATE_AND_BUY_TOKEN action."); - return false; - } - const { - deployerPrivateKey, - tokenMetadata, - buyAmountSol, - priorityFee, - allowOffCurve, - } = content; - - const privateKey = runtime.getSetting("WALLET_PRIVATE_KEY")!; - const wallet = new Wallet( - Keypair.fromSecretKey(new Uint8Array(JSON.parse(privateKey))) - ); - const connection = new Connection(settings.RPC_URL!); - const provider = new AnchorProvider(connection, wallet, { - commitment: "finalized", - }); - const sdk = new PumpFunSDK(provider); - const slippage = runtime.getSetting("SLIPPAGE"); - - try { - const deployerKeypair = Keypair.fromSecretKey( - Uint8Array.from(Buffer.from(deployerPrivateKey, "base64")) - ); + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state: State, + _options: { [key: string]: unknown }, + callback?: HandlerCallback + ): Promise => { + console.log("Starting CREATE_AND_BUY_TOKEN handler..."); + + // Compose state if not provided + if (!state) { + state = (await runtime.composeState(message)) as State; + } else { + state = await runtime.updateRecentMessageState(state); + } + + // Get wallet info for context + const walletInfo = await walletProvider.get(runtime, message, state); + state.walletInfo = walletInfo; + + // Generate structured content from natural language + const pumpContext = composeContext({ + state, + template: pumpfunTemplate, + }); + + const content = await generateObject({ + runtime, + context: pumpContext, + modelClass: ModelClass.LARGE, + }); + + // Validate the generated content + if (!isCreateAndBuyContent(runtime, content)) { + console.error("Invalid content for CREATE_AND_BUY_TOKEN action."); + return false; + } + + const { tokenMetadata, buyAmountSol } = content; + /* + // Generate image if tokenMetadata.file is empty or invalid + if (!tokenMetadata.file || tokenMetadata.file.length < 100) { // Basic validation + try { + const imageResult = await generateImage({ + prompt: `logo for ${tokenMetadata.name} (${tokenMetadata.symbol}) token - ${tokenMetadata.description}`, + width: 512, + height: 512, + count: 1 + }, runtime); + + if (imageResult.success && imageResult.data && imageResult.data.length > 0) { + // Remove the "data:image/png;base64," prefix if present + tokenMetadata.file = imageResult.data[0].replace(/^data:image\/[a-z]+;base64,/, ''); + } else { + console.error("Failed to generate image:", imageResult.error); + return false; + } + } catch (error) { + console.error("Error generating image:", error); + return false; + } + } */ - const mintKeypair = Keypair.generate(); + const imageResult = await generateImage({ + prompt: `logo for ${tokenMetadata.name} (${tokenMetadata.symbol}) token - ${tokenMetadata.description}`, + width: 256, + height: 256, + count: 1 + }, runtime); - const createAndBuyConfirmation = await promptConfirmation(); - if (!createAndBuyConfirmation) { - console.log("Create and buy token canceled by user"); - return false; + + tokenMetadata.image_description = imageResult.data[0].replace(/^data:image\/[a-z]+;base64,/, ''); + + + + + // Convert base64 string to Blob + const base64Data = tokenMetadata.image_description; + const outputPath = path.join(process.cwd(), `generated_image_${Date.now()}.txt`); + fs.writeFileSync(outputPath, base64Data); + console.log(`Base64 data saved to: ${outputPath}`); + + + const byteCharacters = atob(base64Data); + const byteNumbers = new Array(byteCharacters.length); + for (let i = 0; i < byteCharacters.length; i++) { + byteNumbers[i] = byteCharacters.charCodeAt(i); } + const byteArray = new Uint8Array(byteNumbers); + const blob = new Blob([byteArray], { type: 'image/png' }); + + // Add the default decimals and convert file to Blob + const fullTokenMetadata: CreateTokenMetadata = { + name: tokenMetadata.name, + symbol: tokenMetadata.symbol, + description: tokenMetadata.description, + file: blob, + }; - // Execute Create and Buy - await createAndBuyToken({ - deployer: deployerKeypair, - mint: mintKeypair, - tokenMetadata: tokenMetadata as CreateTokenMetadata, - buyAmountSol: BigInt(buyAmountSol), - priorityFee: priorityFee as PriorityFee, - allowOffCurve: allowOffCurve as boolean, - sdk, - connection, - slippage, - }); + // Default priority fee for high network load + const priorityFee = { + unitLimit: 100_000_000, + unitPrice: 100_000 + }; + const slippage = "2000" + try { + // Get private key from settings and create deployer keypair + const privateKeyString = runtime.getSetting("WALLET_PRIVATE_KEY")!; + const secretKey = bs58.decode(privateKeyString); + const deployerKeypair = Keypair.fromSecretKey(secretKey); - console.log( - `Token created and purchased successfully! View at: https://pump.fun/${mintKeypair.publicKey.toBase58()}` - ); - return true; - } catch (error) { - console.error("Error during create and buy token:", error); - return false; - } + // Generate new mint keypair + const mintKeypair = Keypair.generate(); + console.log(`Generated mint address: ${mintKeypair.publicKey.toBase58()}`); + + // Setup connection and SDK + const connection = new Connection(settings.RPC_URL!, { + commitment: "confirmed", + confirmTransactionInitialTimeout: 500000, // 120 seconds + wsEndpoint: settings.RPC_URL!.replace('https', 'wss') + }); + + const wallet = new Wallet(deployerKeypair); + const provider = new AnchorProvider(connection, wallet, { + commitment: "finalized" + }); + const sdk = new PumpFunSDK(provider); + // const slippage = runtime.getSetting("SLIPPAGE"); + + + const createAndBuyConfirmation = await promptConfirmation(); + if (!createAndBuyConfirmation) { + console.log("Create and buy token canceled by user"); + return false; + } + + // Convert SOL to lamports (1 SOL = 1_000_000_000 lamports) + const lamports = Math.floor(Number(buyAmountSol) * 1_000_000_000); + + console.log("Executing create and buy transaction..."); + const result = await createAndBuyToken({ + deployer: deployerKeypair, + mint: mintKeypair, + tokenMetadata: fullTokenMetadata, + buyAmountSol: BigInt(lamports), + priorityFee, + allowOffCurve: false, + sdk, + connection, + slippage, + }); + + + if (callback) { + if (result.success) { + callback({ + text: `Token ${tokenMetadata.name} (${tokenMetadata.symbol}) created successfully!\nContract Address: ${result.ca}\nCreator: ${result.creator}\nView at: https://pump.fun/${result.ca}`, + content: { + tokenInfo: { + symbol: tokenMetadata.symbol, + address: result.ca, + creator: result.creator, + name: tokenMetadata.name, + description: tokenMetadata.description, + timestamp: Date.now() + } + } + }); + } else { + callback({ + text: `Failed to create token: ${result.error}\nAttempted mint address: ${result.ca}`, + content: { + error: result.error, + mintAddress: result.ca + } + }); + } + } + //await trustScoreDb.addToken(tokenInfo); + /* + // Update runtime state + await runtime.updateState({ + ...state, + lastCreatedToken: tokenInfo + }); + */ + // Log success message with token view URL + const successMessage = `Token created and purchased successfully! View at: https://pump.fun/${mintKeypair.publicKey.toBase58()}`; + console.log(successMessage); + return result.success; + } catch (error) { + if (callback) { + callback({ + text: `Error during token creation: ${error.message}`, + content: { error: error.message } + }); + } + return false; + } }, examples: [ @@ -298,32 +499,27 @@ export default { { user: "{{user1}}", content: { - deployerPrivateKey: "Base64EncodedPrivateKey", - tokenMetadata: { - name: "MyToken", - symbol: "MTK", - description: "My first token", - file: "Base64EncodedFile", // blob file of the image - decimals: DEFAULT_DECIMALS, - }, - buyAmountSol: "1000000000", // 1 SOL in lamports - priorityFee: 1000, - allowOffCurve: false, - }, + text: "Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it. Also come up with a description for it to use for image generation .buy 0.00069 SOL worth." + } }, { user: "{{user2}}", content: { - text: "Creating and buying 1 SOL worth of MyToken...", + text: "Token GLITCHIZA (GLITCHIZA) created successfully!\nContract Address: 3kD5DN4bbA3nykb1abjS66VF7cYZkKdirX8bZ6ShJjBB\nCreator: 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nView at: https://pump.fun/EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", action: "CREATE_AND_BUY_TOKEN", - }, - }, - { - user: "{{user2}}", - content: { - text: "Token created and purchased successfully! View at: https://pump.fun/MintPublicKey", - }, - }, - ], - ] as ActionExample[][], + content: { + tokenInfo: { + symbol: "GLITCHIZA", + address: "EugPwuZ8oUMWsYHeBGERWvELfLGFmA1taDtmY8uMeX6r", + creator: "9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa", + name: "GLITCHIZA", + description: "A GLITCHIZA token" + } + } + } + } + ] + ] as ActionExample[][] + + , } as Action; diff --git a/packages/plugin-solana/src/actions/transfer.ts b/packages/plugin-solana/src/actions/transfer.ts new file mode 100644 index 00000000000..c552c21e261 --- /dev/null +++ b/packages/plugin-solana/src/actions/transfer.ts @@ -0,0 +1,246 @@ +import { AnchorProvider } from "@coral-xyz/anchor"; +import { Wallet } from "@coral-xyz/anchor"; + +import { getAssociatedTokenAddressSync, createTransferInstruction } from "@solana/spl-token"; +import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes/index.js"; +import settings from "@ai16z/eliza/src/settings.ts"; + +import { + Connection, + Keypair, + PublicKey, + TransactionMessage, + VersionedTransaction +} from "@solana/web3.js"; + + +import { + ActionExample, + Content, + HandlerCallback, + IAgentRuntime, + Memory, + ModelClass, + State, + type Action, +} from "@ai16z/eliza/src/types.ts"; +import { composeContext } from "@ai16z/eliza/src/context.ts"; +import { generateObject } from "@ai16z/eliza/src/generation.ts"; + +export interface TransferContent extends Content { + tokenAddress: string; + recipient: string; + amount: string | number; +} + +function isTransferContent( + runtime: IAgentRuntime, + content: any +): content is TransferContent { + console.log("Content for transfer", content); + return ( + typeof content.tokenAddress === "string" && + typeof content.recipient === "string" && + (typeof content.amount === "string" || + typeof content.amount === "number") + ); +} + +const transferTemplate = `Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined. + +Example response: +\`\`\`json +{ + "tokenAddress": "BieefG47jAHCGZBxi2q87RDuHyGZyYC3vAzxpyu8pump", + "recipient": "9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa", + "amount": "1000" +} +\`\`\` + +{{recentMessages}} + +Given the recent messages, extract the following information about the requested token transfer: +- Token contract address +- Recipient wallet address +- Amount to transfer + +Respond with a JSON markdown block containing only the extracted values.`; + +export default { + name: "SEND_TOKEN", + similes: ["TRANSFER_TOKEN", "TRANSFER_TOKENS", "SEND_TOKENS", "SEND_SOL", "PAY"], + validate: async (runtime: IAgentRuntime, message: Memory) => { + console.log("Validating transfer from user:", message.userId); + //add custom validate logic here + /* + const adminIds = runtime.getSetting("ADMIN_USER_IDS")?.split(",") || []; + //console.log("Admin IDs from settings:", adminIds); + + const isAdmin = adminIds.includes(message.userId); + + if (isAdmin) { + //console.log(`Authorized transfer from user: ${message.userId}`); + return true; + } + else + { + //console.log(`Unauthorized transfer attempt from user: ${message.userId}`); + return false; + } + */ + return false; + }, + description: "Transfer tokens from the agent's wallet to another address", + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state: State, + _options: { [key: string]: unknown }, + callback?: HandlerCallback + ): Promise => { + console.log("Starting TRANSFER_TOKEN handler..."); + + // Initialize or update state + if (!state) { + state = (await runtime.composeState(message)) as State; + } else { + state = await runtime.updateRecentMessageState(state); + } + + // Compose transfer context + const transferContext = composeContext({ + state, + template: transferTemplate, + }); + + // Generate transfer content + const content = await generateObject({ + runtime, + context: transferContext, + modelClass: ModelClass.SMALL, + }); + + // Validate transfer content + if (!isTransferContent(runtime, content)) { + console.error("Invalid content for TRANSFER_TOKEN action."); + if (callback) { + callback({ + text: "Unable to process transfer request. Invalid content provided.", + content: { error: "Invalid transfer content" } + }); + } + return false; + } + +try { + const privateKeyString = runtime.getSetting("WALLET_PRIVATE_KEY")!; + const secretKey = bs58.decode(privateKeyString); + const senderKeypair = Keypair.fromSecretKey(secretKey); + + const connection = new Connection(settings.RPC_URL!); + + const mintPubkey = new PublicKey(content.tokenAddress); + const recipientPubkey = new PublicKey(content.recipient); + + // Get decimals (simplest way) + const mintInfo = await connection.getParsedAccountInfo(mintPubkey); + const decimals = (mintInfo.value?.data as any)?.parsed?.info?.decimals ?? 9; + + // Adjust amount with decimals + const adjustedAmount = BigInt(Number(content.amount) * Math.pow(10, decimals)); + console.log(`Transferring: ${content.amount} tokens (${adjustedAmount} base units)`); + + // Rest of the existing working code... + const senderATA = getAssociatedTokenAddressSync(mintPubkey, senderKeypair.publicKey); + const recipientATA = getAssociatedTokenAddressSync(mintPubkey, recipientPubkey); + + const instructions = []; + + const recipientATAInfo = await connection.getAccountInfo(recipientATA); + if (!recipientATAInfo) { + const { createAssociatedTokenAccountInstruction } = await import("@solana/spl-token"); + instructions.push( + createAssociatedTokenAccountInstruction( + senderKeypair.publicKey, + recipientATA, + recipientPubkey, + mintPubkey + ) + ); + } + + instructions.push( + createTransferInstruction( + senderATA, + recipientATA, + senderKeypair.publicKey, + adjustedAmount + ) + ); + + + + // Create and sign versioned transaction + const messageV0 = new TransactionMessage({ + payerKey: senderKeypair.publicKey, + recentBlockhash: (await connection.getLatestBlockhash()).blockhash, + instructions + }).compileToV0Message(); + + const transaction = new VersionedTransaction(messageV0); + transaction.sign([senderKeypair]); + + // Send transaction + const signature = await connection.sendTransaction(transaction); + + console.log("Transfer successful:", signature); + + if (callback) { + callback({ + text: `Successfully transferred ${content.amount} tokens to ${content.recipient}\nTransaction: ${signature}`, + content: { + success: true, + signature, + amount: content.amount, + recipient: content.recipient + } + }); + } + + return true; +} catch (error) { + console.error("Error during token transfer:", error); + if (callback) { + callback({ + text: `Error transferring tokens: ${error.message}`, + content: { error: error.message } + }); + } + return false; + } + }, + + examples: [ + [ + { + user: "{{user1}}", + content: { + text: "Send 69 EZSIS BieefG47jAHCGZBxi2q87RDuHyGZyYC3vAzxpyu8pump to 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa" + } + }, + { + user: "{{user2}}", + content: { + text: "I'll send 69 EZSIS tokens now...", + action: "SEND_TOKEN" + } + }, + { + user: "{{user2}}", + content: { + text: "Successfully sent 69 EZSIS tokens to 9jW8FPr6BSSsemWPV22UUCzSqkVdTp6HTyPqeqyuBbCa\nTransaction: 5KtPn3DXXzHkb7VAVHZGwXJQqww39ASnrf7YkyJoF2qAGEpBEEGvRHLnnTG8ZVwKqNHMqSckWVGnsQAgfH5pbxEb" + } + } + ] + ] as ActionExample[][] +} as Action; diff --git a/packages/plugin-solana/src/index.ts b/packages/plugin-solana/src/index.ts index 763dae9e749..02deb267747 100644 --- a/packages/plugin-solana/src/index.ts +++ b/packages/plugin-solana/src/index.ts @@ -1,8 +1,9 @@ import { Plugin } from "@ai16z/eliza/src/types.ts"; -// import { executeSwap } from "./actions/swap.ts"; -// import take_order from "./actions/takeOrder"; -// import pumpfun from "./actions/pumpfun"; -// import { executeSwapForDAO } from "./actions/swapDao"; +//import { executeSwap } from "./actions/swap.ts"; +//import take_order from "./actions/takeOrder"; +//import pumpfun from "./actions/pumpfun.ts"; +//import { executeSwapForDAO } from "./actions/swapDao"; +//import transferToken from "./actions/transfer.ts"; import { walletProvider } from "./providers/wallet.ts"; import { trustScoreProvider } from "./providers/trustScoreProvider.ts"; import { trustEvaluator } from "./evaluators/trust.ts"; @@ -11,12 +12,15 @@ export const solanaPlugin: Plugin = { name: "solana", description: "Solana Plugin for Eliza", actions: [ - // executeSwap, - // pumpfun, - // executeSwapForDAO, - // take_order, + //executeSwap, + //pumpfun, + //transferToken, + //executeSwapForDAO, + //take_order, + ], + evaluators: [ + trustEvaluator ], - evaluators: [trustEvaluator], providers: [walletProvider, trustScoreProvider], }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e55a04510a4..d64fef99e65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10461,8 +10461,8 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} - streamx@2.20.1: - resolution: {integrity: sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==} + streamx@2.20.2: + resolution: {integrity: sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==} string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} @@ -16797,7 +16797,7 @@ snapshots: bare-stream@2.3.2: dependencies: - streamx: 2.20.1 + streamx: 2.20.2 optional: true base-x@3.0.10: @@ -24231,7 +24231,7 @@ snapshots: streamsearch@1.1.0: {} - streamx@2.20.1: + streamx@2.20.2: dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -24444,7 +24444,7 @@ snapshots: dependencies: b4a: 1.6.7 fast-fifo: 1.3.2 - streamx: 2.20.1 + streamx: 2.20.2 tar@6.2.1: dependencies: diff --git a/scripts/build.sh b/scripts/build.sh index e94f5d1e50c..51292d99c29 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Check Node.js version +REQUIRED_NODE_VERSION=23 +CURRENT_NODE_VERSION=$(node -v | cut -d'.' -f1 | sed 's/v//') + +if (( CURRENT_NODE_VERSION < REQUIRED_NODE_VERSION )); then + echo "Error: Node.js version must be $REQUIRED_NODE_VERSION or higher. Current version is $CURRENT_NODE_VERSION." + exit 1 +fi + # Navigate to the script's directory cd "$(dirname "$0")"/..