Skip to content

Commit cb2898c

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into twitter-convo
2 parents 9c17b68 + d187801 commit cb2898c

File tree

58 files changed

+1493
-1272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1493
-1272
lines changed

.github/workflows/pr.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ jobs:
1010

1111
steps:
1212
- name: Check out the repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414

1515
- name: Validate PR title
1616
id: validate
1717
run: |
1818
PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
1919
echo "PR Title: $PR_TITLE"
20-
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore):\ .+ ]]; then
20+
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore)(\([a-zA-Z0-9-]+\))?:\ .+ ]]; then
2121
echo "PR title does not match the required pattern."
2222
exit 1
2323
fi
2424
2525
- name: Set status
2626
if: failure()
2727
run: |
28-
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat|fix|docs|style|refactor|test|chore: title')."
28+
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use one of these formats:
29+
- 'type: description' (e.g., 'feat: add new feature')
30+
- 'type(scope): description' (e.g., 'chore(core): update dependencies')"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## 🌍 README Translations
1414

15-
[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md)
15+
[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) | [Tagalog](./README_TG.md)
1616

1717
## ✨ Features
1818

README_TG.md

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
# Eliza 🤖
3+
4+
<div align="center">
5+
<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
6+
</div>
7+
8+
<div align="center">
9+
10+
📖 [Dokumentasyon](https://elizaos.github.io/eliza/) | 🎯 [Mga Halimbawa](https://github.com/thejoven/awesome-eliza)
11+
12+
</div>
13+
14+
## ✨ Mga Tampok
15+
16+
- 🛠️ Kumpletong suporta sa [Discord](https://discord.com/), [Twitter](https://twitter.com/), at [Telegram](https://telegram.org/)
17+
- 🔗 Suporta para sa bawat modelo (Llama, Grok, OpenAI, Anthropic, atbp.)
18+
- 👥 Suporta para sa multi-agent at kuwarto
19+
- 📚 Madaling mag-load at makipag-ugnayan sa iyong mga dokumento
20+
- 💾 Naaakses na memorya at imbakan ng dokumento
21+
- 🚀 Napakabisa - maaaring gumawa ng sarili mong mga aksyon at kliyente
22+
- ☁️ Sinusuportahan ang maraming modelo (lokal na Llama, OpenAI, Anthropic, Groq, atbp.)
23+
- 📦 Madaling gamitin!
24+
25+
## Mga Tutorial sa Bidyo
26+
27+
[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL)
28+
29+
## 🎯 Gamit ito para sa
30+
31+
- 🤖 [Mga Chatbot](https://en.wikipedia.org/wiki/Chatbot)
32+
- 🕵️ Mga Awtonomikong Ahente
33+
- 📈 Pagproseso ng Negosyo
34+
- 🎮 [Mga NPC sa mga Larong Kompyuter](https://en.wikipedia.org/wiki/Non-player_character)
35+
- 🧠 Pangangalakal
36+
37+
## 🚀 Pangkalahatang-ideya
38+
39+
### Mga Kinakailangan
40+
41+
- [Python 2.7+](https://www.python.org/downloads/)
42+
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
43+
- [pnpm](https://pnpm.io/installation)
44+
45+
> **Paalala para sa mga Gumagamit ng Windows:** Kailangan ang [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual).
46+
47+
### Gamitin ang Starter (Inirerekomenda)
48+
49+
```bash
50+
git clone https://github.com/elizaos/eliza-starter.git
51+
cd eliza-starter
52+
cp .env.example .env
53+
pnpm i && pnpm build && pnpm start
54+
```
55+
56+
Basahin ang [Dokumentasyon](https://elizaos.github.io/eliza/) upang matutunan kung paano ipasadya ang Eliza.
57+
58+
### Manwal na Pag-simula ng Eliza (Inirerekomenda lamang kung alam mo ang ginagawa mo)
59+
60+
```bash
61+
# Clone the repository
62+
git clone https://github.com/elizaos/eliza.git
63+
64+
# Checkout the latest release
65+
git checkout $(git describe --tags --abbrev=0)
66+
```
67+
68+
### Simulan ang Eliza gamit ang Gitpod
69+
70+
[![Buksan sa Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main)
71+
72+
### Ipasadya ang .env File
73+
74+
Kopyahin ang `.env.example` sa `.env` at punan ang tamang mga halaga.
75+
76+
```bash
77+
cp .env.example .env
78+
```
79+
80+
### Awtomatikong Simulan ang Eliza
81+
82+
Ito ay magse-setup ng proyekto at sisimulan ang bot gamit ang kusang mapagpipilian na karakter.
83+
84+
```bash
85+
sh scripts/start.sh
86+
```
87+
88+
### Ipasadya ang Karakter File
89+
90+
1. Buksan ang `packages/core/src/defaultCharacter.ts` para baguhin ang kusang mapagpipilian na karakter.
91+
2. Mag-load ng pasadya na mga karakter:
92+
- Gamitin ang `pnpm start --characters="landas/sa/inyong/character.json"`
93+
- Puwedeng mag-load ng maraming karakter file sabay-sabay.
94+
3. Ikonekta ang Twitter (X):
95+
- Baguhin ang `"clients": []` sa `"clients": ["twitter"]` sa karakter file upang ikonekta ang Twitter.
96+
97+
### Manwal na Pag-simula ng Eliza
98+
99+
```bash
100+
pnpm i
101+
pnpm build
102+
pnpm start
103+
104+
# Linisin ang proyekto kung bumalik ka dito matapos ang mahabang panahon
105+
pnpm clean
106+
```
107+
108+
#### Karagdagang Mga Kinakailangan
109+
110+
Puwede mong kailangang mag-install ng [Sharp](https://sharp.pixelplumbing.com/). Kung may pagkakamali, subukang i-install ito gamit ang:
111+
112+
```bash
113+
pnpm install --include=optional sharp
114+
```
115+
116+
### Komunidad at Kontak
117+
118+
- [Mga Isyu sa GitHub](https://github.com/elizaos/eliza/issues): Para sa mga bug at mungkahi sa tampok.
119+
- [Discord](https://discord.gg/ai16z): Para sa pagbabahagi ng aplikasyon at pakikihalubilo sa komunidad.
120+
121+
## Mga Kontribyutor
122+
123+
<a href="https://github.com/elizaos/eliza/graphs/contributors">
124+
<img src="https://contrib.rocks/image?repo=elizaos/eliza" />
125+
</a>
126+
127+
## Kasaysayan ng mga Bituin
128+
129+
[![Tsart ng Kasaysayan ng mga Bituin](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)

agent/src/index.ts

+38-7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import fs from "fs";
6060
import path from "path";
6161
import { fileURLToPath } from "url";
6262
import yargs from "yargs";
63+
import net from "net";
6364

6465
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
6566
const __dirname = path.dirname(__filename); // get the name of the directory
@@ -489,7 +490,7 @@ export async function createAgent(
489490
}
490491

491492
let goatPlugin: any | undefined;
492-
if (getSecret(character, "ALCHEMY_API_KEY")) {
493+
if (getSecret(character, "EVM_PROVIDER_URL")) {
493494
goatPlugin = await createGoatPlugin((secret) =>
494495
getSecret(character, secret)
495496
);
@@ -560,7 +561,7 @@ export async function createAgent(
560561
getSecret(character, "COINBASE_NOTIFICATION_URI")
561562
? webhookPlugin
562563
: null,
563-
getSecret(character, "ALCHEMY_API_KEY") ? goatPlugin : null,
564+
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
564565
getSecret(character, "FLOW_ADDRESS") &&
565566
getSecret(character, "FLOW_PRIVATE_KEY")
566567
? flowPlugin
@@ -692,13 +693,30 @@ async function startAgent(
692693
}
693694
}
694695

696+
const checkPortAvailable = (port: number): Promise<boolean> => {
697+
return new Promise((resolve) => {
698+
const server = net.createServer();
699+
700+
server.once("error", (err: NodeJS.ErrnoException) => {
701+
if (err.code === "EADDRINUSE") {
702+
resolve(false);
703+
}
704+
});
705+
706+
server.once("listening", () => {
707+
server.close();
708+
resolve(true);
709+
});
710+
711+
server.listen(port);
712+
});
713+
};
714+
695715
const startAgents = async () => {
696716
const directClient = new DirectClient();
697-
const serverPort = parseInt(settings.SERVER_PORT || "3000");
717+
let serverPort = parseInt(settings.SERVER_PORT || "3000");
698718
const args = parseArguments();
699-
700719
let charactersArg = args.characters || args.character;
701-
702720
let characters = [defaultCharacter];
703721

704722
if (charactersArg) {
@@ -713,19 +731,32 @@ const startAgents = async () => {
713731
elizaLogger.error("Error starting agents:", error);
714732
}
715733

734+
// Find available port
735+
while (!(await checkPortAvailable(serverPort))) {
736+
elizaLogger.warn(
737+
`Port ${serverPort} is in use, trying ${serverPort + 1}`
738+
);
739+
serverPort++;
740+
}
741+
716742
// upload some agent functionality into directClient
717743
directClient.startAgent = async (character: Character) => {
718744
// wrap it so we don't have to inject directClient later
719745
return startAgent(character, directClient);
720746
};
747+
721748
directClient.start(serverPort);
722749

750+
if (serverPort !== parseInt(settings.SERVER_PORT || "3000")) {
751+
elizaLogger.log(`Server started on alternate port ${serverPort}`);
752+
}
753+
723754
elizaLogger.log(
724-
"Run `pnpm start:client` to start the client and visit the outputted URL (http://localhost:5173) to chat with your agents"
755+
"Run `pnpm start:client` to start the client and visit the outputted URL (http://localhost:5173) to chat with your agents. When running multiple agents, use client with different port `SERVER_PORT=3001 pnpm start:client`"
725756
);
726757
};
727758

728759
startAgents().catch((error) => {
729760
elizaLogger.error("Unhandled error in startAgents:", error);
730-
process.exit(1); // Exit the process after logging
761+
process.exit(1);
731762
});

client/package.json

+45-45
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
2-
"name": "eliza-client",
3-
"private": true,
4-
"version": "0.1.7-alpha.1",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "vite build",
9-
"check-types": "tsc --noEmit",
10-
"lint": "eslint .",
11-
"preview": "vite preview"
12-
},
13-
"dependencies": {
14-
"@elizaos/core": "workspace:*",
15-
"@radix-ui/react-dialog": "1.1.2",
16-
"@radix-ui/react-separator": "1.1.0",
17-
"@radix-ui/react-slot": "1.1.0",
18-
"@radix-ui/react-tooltip": "1.1.4",
19-
"@tanstack/react-query": "5.61.0",
20-
"class-variance-authority": "0.7.1",
21-
"clsx": "2.1.1",
22-
"lucide-react": "0.460.0",
23-
"react": "18.3.1",
24-
"react-dom": "18.3.1",
25-
"react-router-dom": "6.22.1",
26-
"tailwind-merge": "2.5.5",
27-
"tailwindcss-animate": "1.0.7",
28-
"vite-plugin-top-level-await": "1.4.4",
29-
"vite-plugin-wasm": "3.3.0"
30-
},
31-
"devDependencies": {
32-
"@eslint/js": "9.16.0",
33-
"@types/node": "22.8.4",
34-
"@types/react": "18.3.12",
35-
"@types/react-dom": "18.3.1",
36-
"@vitejs/plugin-react": "4.3.3",
37-
"autoprefixer": "10.4.20",
38-
"eslint-plugin-react-hooks": "5.0.0",
39-
"eslint-plugin-react-refresh": "0.4.14",
40-
"globals": "15.11.0",
41-
"postcss": "8.4.49",
42-
"tailwindcss": "3.4.15",
43-
"typescript": "5.6.3",
44-
"typescript-eslint": "8.11.0",
45-
"vite": "link:@tanstack/router-plugin/vite"
46-
}
2+
"name": "eliza-client",
3+
"private": true,
4+
"version": "0.1.7-alpha.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"check-types": "tsc --noEmit",
10+
"lint": "eslint .",
11+
"preview": "vite preview"
12+
},
13+
"dependencies": {
14+
"@elizaos/core": "workspace:*",
15+
"@radix-ui/react-dialog": "1.1.2",
16+
"@radix-ui/react-separator": "1.1.0",
17+
"@radix-ui/react-slot": "1.1.0",
18+
"@radix-ui/react-tooltip": "1.1.4",
19+
"@tanstack/react-query": "5.61.0",
20+
"class-variance-authority": "0.7.1",
21+
"clsx": "2.1.1",
22+
"lucide-react": "0.460.0",
23+
"react": "18.3.1",
24+
"react-dom": "18.3.1",
25+
"react-router-dom": "6.22.1",
26+
"tailwind-merge": "2.5.5",
27+
"tailwindcss-animate": "1.0.7",
28+
"vite-plugin-top-level-await": "1.4.4",
29+
"vite-plugin-wasm": "3.3.0"
30+
},
31+
"devDependencies": {
32+
"@eslint/js": "9.16.0",
33+
"@types/node": "22.8.4",
34+
"@types/react": "18.3.12",
35+
"@types/react-dom": "18.3.1",
36+
"@vitejs/plugin-react": "4.3.3",
37+
"autoprefixer": "10.4.20",
38+
"eslint-plugin-react-hooks": "5.0.0",
39+
"eslint-plugin-react-refresh": "0.4.14",
40+
"globals": "15.11.0",
41+
"postcss": "8.4.49",
42+
"tailwindcss": "3.4.15",
43+
"typescript": "5.6.3",
44+
"typescript-eslint": "8.11.0",
45+
"vite": "link:@tanstack/router-plugin/vite"
46+
}
4747
}

0 commit comments

Comments
 (0)