Skip to content

Commit bebb0ca

Browse files
author
Shaw
committed
chore: commit current docs and benchmark updates
1 parent d7a3107 commit bebb0ca

2 files changed

Lines changed: 27 additions & 60 deletions

File tree

packages/examples/discord/README.md

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Discord Agent Examples
1+
# Discord Agent Example
22

3-
Full-featured Discord AI agents using elizaOS, available in **TypeScript**, **Python**, and **Rust**.
3+
Full-featured TypeScript Discord AI agent using elizaOS.
44

55
## Features
66

@@ -46,73 +46,36 @@ Required variables:
4646

4747
### 4. Run the Agent
4848

49-
Choose your preferred language:
50-
51-
#### TypeScript
5249
```bash
53-
cd typescript
50+
cd packages/examples/discord
5451
bun install
55-
bun start
52+
bun run start
5653
# or for development with hot reload:
57-
bun dev
58-
```
59-
60-
#### Python
61-
```bash
62-
cd python
63-
pip install -r requirements.txt
64-
python agent.py
65-
```
66-
67-
#### Rust
68-
```bash
69-
cd rust/discord-agent
70-
cargo run --release
54+
bun run dev
7155
```
7256

7357
## Project Structure
7458

7559
```
76-
examples/discord/
60+
packages/examples/discord/
7761
├── env.example # Environment template
7862
├── README.md # This file
79-
├── typescript/ # TypeScript implementation
80-
│ ├── agent.ts # Main entry point
81-
│ ├── character.ts # Bot personality
82-
│ ├── handlers.ts # Event handlers
83-
│ ├── package.json
84-
│ └── __tests__/ # Tests
85-
├── python/ # Python implementation
86-
│ ├── agent.py # Main entry point
87-
│ ├── character.py # Bot personality
88-
│ ├── handlers.py # Event handlers
89-
│ ├── requirements.txt
90-
│ └── tests/ # Tests
91-
└── rust/ # Rust implementation
92-
└── discord-agent/
93-
├── Cargo.toml
94-
├── src/
95-
│ ├── main.rs # Main entry point
96-
│ ├── character.rs # Bot personality
97-
│ └── handlers.rs # Event handlers
98-
└── tests/ # Tests
63+
├── agent.ts # Main entry point
64+
├── character.ts # Bot personality
65+
├── handlers.ts # Event handlers
66+
├── package.json
67+
└── tsconfig.json
9968
```
10069

10170
## Customization
10271

10372
### Modify Bot Personality
10473

105-
Edit the character file for your language:
106-
- TypeScript: `typescript/character.ts`
107-
- Python: `python/character.py`
108-
- Rust: `rust/discord-agent/src/character.rs`
74+
Edit `character.ts`.
10975

11076
### Add Custom Commands
11177

112-
Edit the handlers file to add new slash commands:
113-
- TypeScript: `typescript/handlers.ts`
114-
- Python: `python/handlers.py`
115-
- Rust: `rust/discord-agent/src/handlers.rs`
78+
Edit `handlers.ts` to add new slash commands.
11679

11780
### Discord Settings
11881

@@ -137,14 +100,8 @@ Configure bot behavior in the character settings:
137100
## Testing
138101

139102
```bash
140-
# TypeScript
141-
cd typescript && bun test
142-
143-
# Python
144-
cd python && pytest
145-
146-
# Rust
147-
cd rust/discord-agent && cargo test
103+
cd packages/examples/discord
104+
bun run test
148105
```
149106

150107
## Troubleshooting

packages/training/scripts/benchmark_vs_cerebras.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,23 @@ def _find_checkpoint(output_dir: Path, tier: str, entry: Any) -> Path | None:
7474
7575
Search order: polarquant → fused_turboquant → turboquant → plain final.
7676
Returns None if no checkpoint is found.
77+
78+
Matches directories starting with any of:
79+
- entry.eliza_short_name (e.g. "eliza-1-0_8b")
80+
- tier with dots→dashes (e.g. "qwen3-5-0-8b")
81+
- tier safe variant (e.g. "eliza-1-qwen3_5_0_8b" for APOLLO runs)
7782
"""
7883
eliza_name = entry.eliza_short_name
79-
# Find the most recent run dir matching the tier
84+
safe_tier = tier.replace(".", "_").replace("-", "_")
85+
apollo_prefix = f"eliza-1-{safe_tier}"
8086
candidates: list[Path] = []
8187
if output_dir.exists():
8288
for d in sorted(output_dir.iterdir(), reverse=True):
83-
if d.is_dir() and (d.name.startswith(eliza_name) or d.name.startswith(tier.replace(".", "-"))):
89+
if d.is_dir() and (
90+
d.name.startswith(eliza_name)
91+
or d.name.startswith(tier.replace(".", "-"))
92+
or d.name.startswith(apollo_prefix)
93+
):
8494
candidates.append(d)
8595

8696
for run_dir in candidates:

0 commit comments

Comments
 (0)