Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ai16z/eliza
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Nov 20, 2024
2 parents 79c5289 + 38b02a7 commit 8cb3467
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 74 deletions.
6 changes: 0 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
**/*/target
**/*/dist
packages/torii-client/wasm
packages/torii-client/pkg
packages/torii-wasm/pkg/
packages/utils-wasm/pkg/

worlds/dojo-starter

# ignore lock files
**/*-lock.yaml
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [v0.1.3](https://github.com/ai16z/eliza/tree/v0.1.3) (2024-11-20)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.3-alpha.2...v0.1.3)

**Implemented enhancements:**

- ⚙️Take Order Action Integration [\#53](https://github.com/ai16z/eliza/issues/53)
- 🔍 Trust Score Calculator [\#52](https://github.com/ai16z/eliza/issues/52)
- 📊 Order Book System [\#49](https://github.com/ai16z/eliza/issues/49)
- daos.fun integration [\#33](https://github.com/ai16z/eliza/issues/33)

**Merged pull requests:**

- fix: voice perms [\#447](https://github.com/ai16z/eliza/pull/447) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- fix: unrug [\#444](https://github.com/ai16z/eliza/pull/444) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- feat: add all the style guidelines to the context [\#441](https://github.com/ai16z/eliza/pull/441) ([o-on-x](https://github.com/o-on-x))
- fix: fixes some console logs [\#440](https://github.com/ai16z/eliza/pull/440) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- fix: The bot is by default deafened and we don't want that [\#437](https://github.com/ai16z/eliza/pull/437) ([martincik](https://github.com/martincik))
- fix: path [\#436](https://github.com/ai16z/eliza/pull/436) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- fix: since agent is moved out of packages, adjust default path [\#432](https://github.com/ai16z/eliza/pull/432) ([odilitime](https://github.com/odilitime))
- fix: Fix linter issues [\#397](https://github.com/ai16z/eliza/pull/397) ([martincik](https://github.com/martincik))

## [v0.1.3-alpha.2](https://github.com/ai16z/eliza/tree/v0.1.3-alpha.2) (2024-11-20)

[Full Changelog](https://github.com/ai16z/eliza/compare/v0.1.3-alpha.1...v0.1.3-alpha.2)
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@

> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required.
### Use the Starter (Recommended)

```bash
git clone https://github.com/ai16z/eliza-starter.git

cp .env.example .env

pnpm i && pnpm start
```

Then read the [Documentation](https://ai16z.github.io/eliza/) to learn how to customize your Eliza.

### Manually Start Eliza (Only recommended if you know what you are doing)

```bash
# Clone the repository
git clone https://github.com/ai16z/eliza.git

# Checkout the latest release
# This project iterates fast, so we recommend checking out the latest release
git checkout $(git describe --tags --abbrev=0)
```

### Edit the .env file

Copy .env.example to .env and fill in the appropriate values.
Expand Down
6 changes: 4 additions & 2 deletions packages/client-discord/src/actions/joinvoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// src/actions/joinVoice
import {
Action,
ActionExample, composeContext, IAgentRuntime,
ActionExample,
composeContext,
IAgentRuntime,
Memory,
State
State,
} from "@ai16z/eliza";
import {
Channel,
Expand Down
8 changes: 6 additions & 2 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ import {
import settings from "./settings.ts";
import {
Content,
IAgentRuntime, IImageDescriptionService, ITextGenerationService, ModelClass, ModelProviderName,
ServiceType
IAgentRuntime,
IImageDescriptionService,
ITextGenerationService,
ModelClass,
ModelProviderName,
ServiceType,
} from "./types.ts";

/**
Expand Down
46 changes: 23 additions & 23 deletions packages/core/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1003,35 +1003,35 @@ Text: ${attachment.text}
formattedCharacterMessageExamples
)
: "",
messageDirections:
this.character?.style?.all?.length > 0 ||
this.character?.style?.chat.length > 0
? addHeader(
"# Message Directions for " + this.character.name,
(() => {
const all = this.character?.style?.all || [];
const chat = this.character?.style?.chat || [];
return [...all, ...chat].join("\n");
})()
)
: "",
messageDirections:
this.character?.style?.all?.length > 0 ||
this.character?.style?.chat.length > 0
? addHeader(
"# Message Directions for " + this.character.name,
(() => {
const all = this.character?.style?.all || [];
const chat = this.character?.style?.chat || [];
return [...all, ...chat].join("\n");
})()
)
: "",

postDirections:
this.character?.style?.all?.length > 0 ||
this.character?.style?.post.length > 0
? addHeader(
"# Post Directions for " + this.character.name,
(() => {
const all = this.character?.style?.all || [];
const post = this.character?.style?.post || [];
return [...all, ...post].join("\n");
})()
)
"# Post Directions for " + this.character.name,
(() => {
const all = this.character?.style?.all || [];
const post = this.character?.style?.post || [];
return [...all, ...post].join("\n");
})()
)
: "",
//old logic left in for reference

//old logic left in for reference
//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?
/*
/*
postDirections:
this.character?.style?.all?.length > 0 ||
this.character?.style?.post.length > 0
Expand Down
82 changes: 41 additions & 41 deletions packages/core/src/test_resources/createRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ export async function createRuntime({

switch (env?.TEST_DATABASE_CLIENT as string) {
case "sqljs":
{
const module = await import("sql.js");

const initSqlJs = module.default;

// SQLite adapter
const SQL = await initSqlJs({});
const db = new SQL.Database();

adapter = new SqlJsDatabaseAdapter(db);

// Load sqlite-vss
loadVecExtensions((adapter as SqlJsDatabaseAdapter).db);
// Create a test user and session
session = {
user: {
id: zeroUuid,
email: "[email protected]",
},
};
}
break;
{
const module = await import("sql.js");

const initSqlJs = module.default;

// SQLite adapter
const SQL = await initSqlJs({});
const db = new SQL.Database();

adapter = new SqlJsDatabaseAdapter(db);

// Load sqlite-vss
loadVecExtensions((adapter as SqlJsDatabaseAdapter).db);
// Create a test user and session
session = {
user: {
id: zeroUuid,
email: "[email protected]",
},
};
}
break;
case "supabase": {
const module = await import("@supabase/supabase-js");

Expand Down Expand Up @@ -108,25 +108,25 @@ export async function createRuntime({
}
case "sqlite":
default:
{
const module = await import("better-sqlite3");

const Database = module.default;

// SQLite adapter
adapter = new SqliteDatabaseAdapter(new Database(":memory:"));

// Load sqlite-vss
await loadVecExtensions((adapter as SqliteDatabaseAdapter).db);
// Create a test user and session
session = {
user: {
id: zeroUuid,
email: "[email protected]",
},
};
}
break;
{
const module = await import("better-sqlite3");

const Database = module.default;

// SQLite adapter
adapter = new SqliteDatabaseAdapter(new Database(":memory:"));

// Load sqlite-vss
await loadVecExtensions((adapter as SqliteDatabaseAdapter).db);
// Create a test user and session
session = {
user: {
id: zeroUuid,
email: "[email protected]",
},
};
}
break;
}

const runtime = new AgentRuntime({
Expand Down

0 comments on commit 8cb3467

Please sign in to comment.