Skip to content

Commit f1b4743

Browse files
readme
1 parent fec2d59 commit f1b4743

File tree

5 files changed

+92
-68
lines changed

5 files changed

+92
-68
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@
4343

4444
> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required.
4545
46+
### Use the Starter (Recommended)
47+
48+
```bash
49+
git clone https://github.com/ai16z/eliza-starter.git
50+
51+
cp .env.example .env
52+
53+
pnpm i && pnpm start
54+
```
55+
56+
Then read the [Documentation](https://ai16z.github.io/eliza/) to learn how to customize your Eliza.
57+
58+
### Manually Start Eliza (Only recommended if you know what you are doing)
59+
60+
```bash
61+
git clone https://github.com/ai16z/eliza.git
62+
```
63+
4664
### Edit the .env file
4765

4866
Copy .env.example to .env and fill in the appropriate values.

packages/client-discord/src/actions/joinvoice.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// src/actions/joinVoice
33
import {
44
Action,
5-
ActionExample, composeContext, IAgentRuntime,
5+
ActionExample,
6+
composeContext,
7+
IAgentRuntime,
68
Memory,
7-
State
9+
State,
810
} from "@ai16z/eliza";
911
import {
1012
Channel,

packages/core/src/generation.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ import {
2424
import settings from "./settings.ts";
2525
import {
2626
Content,
27-
IAgentRuntime, IImageDescriptionService, ITextGenerationService, ModelClass, ModelProviderName,
28-
ServiceType
27+
IAgentRuntime,
28+
IImageDescriptionService,
29+
ITextGenerationService,
30+
ModelClass,
31+
ModelProviderName,
32+
ServiceType,
2933
} from "./types.ts";
3034

3135
/**

packages/core/src/runtime.ts

+23-23
Original file line numberDiff line numberDiff line change
@@ -1000,35 +1000,35 @@ Text: ${attachment.text}
10001000
formattedCharacterMessageExamples
10011001
)
10021002
: "",
1003-
messageDirections:
1004-
this.character?.style?.all?.length > 0 ||
1005-
this.character?.style?.chat.length > 0
1006-
? addHeader(
1007-
"# Message Directions for " + this.character.name,
1008-
(() => {
1009-
const all = this.character?.style?.all || [];
1010-
const chat = this.character?.style?.chat || [];
1011-
return [...all, ...chat].join("\n");
1012-
})()
1013-
)
1014-
: "",
1015-
1003+
messageDirections:
1004+
this.character?.style?.all?.length > 0 ||
1005+
this.character?.style?.chat.length > 0
1006+
? addHeader(
1007+
"# Message Directions for " + this.character.name,
1008+
(() => {
1009+
const all = this.character?.style?.all || [];
1010+
const chat = this.character?.style?.chat || [];
1011+
return [...all, ...chat].join("\n");
1012+
})()
1013+
)
1014+
: "",
1015+
10161016
postDirections:
10171017
this.character?.style?.all?.length > 0 ||
10181018
this.character?.style?.post.length > 0
10191019
? addHeader(
1020-
"# Post Directions for " + this.character.name,
1021-
(() => {
1022-
const all = this.character?.style?.all || [];
1023-
const post = this.character?.style?.post || [];
1024-
return [...all, ...post].join("\n");
1025-
})()
1026-
)
1020+
"# Post Directions for " + this.character.name,
1021+
(() => {
1022+
const all = this.character?.style?.all || [];
1023+
const post = this.character?.style?.post || [];
1024+
return [...all, ...post].join("\n");
1025+
})()
1026+
)
10271027
: "",
1028-
1029-
//old logic left in for reference
1028+
1029+
//old logic left in for reference
10301030
//food for thought. how could we dynamically decide what parts of the character to add to the prompt other than random? rag? prompt the llm to decide?
1031-
/*
1031+
/*
10321032
postDirections:
10331033
this.character?.style?.all?.length > 0 ||
10341034
this.character?.style?.post.length > 0

packages/core/src/test_resources/createRuntime.ts

+41-41
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,28 @@ export async function createRuntime({
3838

3939
switch (env?.TEST_DATABASE_CLIENT as string) {
4040
case "sqljs":
41-
{
42-
const module = await import("sql.js");
43-
44-
const initSqlJs = module.default;
45-
46-
// SQLite adapter
47-
const SQL = await initSqlJs({});
48-
const db = new SQL.Database();
49-
50-
adapter = new SqlJsDatabaseAdapter(db);
51-
52-
// Load sqlite-vss
53-
loadVecExtensions((adapter as SqlJsDatabaseAdapter).db);
54-
// Create a test user and session
55-
session = {
56-
user: {
57-
id: zeroUuid,
58-
email: "test@example.com",
59-
},
60-
};
61-
}
62-
break;
41+
{
42+
const module = await import("sql.js");
43+
44+
const initSqlJs = module.default;
45+
46+
// SQLite adapter
47+
const SQL = await initSqlJs({});
48+
const db = new SQL.Database();
49+
50+
adapter = new SqlJsDatabaseAdapter(db);
51+
52+
// Load sqlite-vss
53+
loadVecExtensions((adapter as SqlJsDatabaseAdapter).db);
54+
// Create a test user and session
55+
session = {
56+
user: {
57+
id: zeroUuid,
58+
email: "test@example.com",
59+
},
60+
};
61+
}
62+
break;
6363
case "supabase": {
6464
const module = await import("@supabase/supabase-js");
6565

@@ -108,25 +108,25 @@ export async function createRuntime({
108108
}
109109
case "sqlite":
110110
default:
111-
{
112-
const module = await import("better-sqlite3");
113-
114-
const Database = module.default;
115-
116-
// SQLite adapter
117-
adapter = new SqliteDatabaseAdapter(new Database(":memory:"));
118-
119-
// Load sqlite-vss
120-
await loadVecExtensions((adapter as SqliteDatabaseAdapter).db);
121-
// Create a test user and session
122-
session = {
123-
user: {
124-
id: zeroUuid,
125-
email: "test@example.com",
126-
},
127-
};
128-
}
129-
break;
111+
{
112+
const module = await import("better-sqlite3");
113+
114+
const Database = module.default;
115+
116+
// SQLite adapter
117+
adapter = new SqliteDatabaseAdapter(new Database(":memory:"));
118+
119+
// Load sqlite-vss
120+
await loadVecExtensions((adapter as SqliteDatabaseAdapter).db);
121+
// Create a test user and session
122+
session = {
123+
user: {
124+
id: zeroUuid,
125+
email: "test@example.com",
126+
},
127+
};
128+
}
129+
break;
130130
}
131131

132132
const runtime = new AgentRuntime({

0 commit comments

Comments
 (0)