Skip to content

Commit

Permalink
Build is building, jest tests are testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Nov 3, 2024
1 parent d4c170a commit d9aeb80
Show file tree
Hide file tree
Showing 14 changed files with 2,780 additions and 21,022 deletions.
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --fix",
"start": "node --loader ts-node/esm src/index.ts",
"start:arok": "node --loader ts-node/esm src/index.ts --characters=\"../characters/arok.character.json\"",
Expand Down
1 change: 1 addition & 0 deletions core/src/actions/askClaude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export const askClaude: Action = {

const response = {
userId,
agentId: runtime.agentId,
content: callbackData,
roomId,
embedding: embeddingZeroVector,
Expand Down
1 change: 1 addition & 0 deletions core/src/clients/twitter/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export async function sendTweetChunks(

const memories: Memory[] = sentTweets.map((tweet) => ({
id: stringToUuid(tweet.id),
agentId: client.runtime.agentId,
userId: client.runtime.agentId,
content: {
text: tweet.text,
Expand Down
2 changes: 2 additions & 0 deletions core/src/test_resources/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from "@jest/globals";

describe('Basic Test Suite', () => {
it('should run a basic test', () => {
expect(true).toBe(true);
Expand Down
2 changes: 2 additions & 0 deletions core/src/test_resources/testSetup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import dotenv from "dotenv";
import path from 'path';

import { jest } from "@jest/globals";

// Load test environment variables
dotenv.config({ path: '.env.test' });

Expand Down
2 changes: 1 addition & 1 deletion core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"noEmitOnError": false,
"moduleDetection": "force",
"allowArbitraryExtensions": true,
"typeRoots": ["./node_modules/@types", "./types"]
"typeRoots": ["./node_modules/@types", "./types", "./node_modules/jest/types"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "src/**/*.d.ts", "types/**/*.test.ts"]
Expand Down
3 changes: 2 additions & 1 deletion core/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare global {
interface Buffer extends Uint8Array {}
interface Buffer extends Uint8Array {
}
}
export {};
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ This the official documentation site of eliza. A flexible, scalable and customiz

Currently eliza is dependent on Supabase for local development. You can install it with the following command:

npm install eliza
pnpm install eliza

# Select your database adapter

npm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
pnpm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)

```
npm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
pnpm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
```

### Set up environment variables
Expand Down Expand Up @@ -55,7 +55,7 @@ Once you have the CLI installed, you can run the following commands to set up a
supabase start
```

You can now start the eliza project with `npm run dev` and it will connect to the local Supabase instance by default.
You can now start the eliza project with `pnpm run dev` and it will connect to the local Supabase instance by default.

NOTE: You will need Docker installed for this to work. If that is an issue for you, use the Supabase Cloud Setup instructions instead below).

Expand Down Expand Up @@ -86,10 +86,10 @@ While eliza uses ChatGPT 3.5 by default, you can use a local model by setting th

### Development

npm run dev # start the server
pnpm run dev # start the server

```
npm run shell # start the shell in another terminal to talk to the default agent
pnpm run shell # start the shell in another terminal to talk to the default agent
```

### Usage
Expand Down
6 changes: 3 additions & 3 deletions docs/api/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
You might need these

```
npm install --include=optional sharp
pnpm install --include=optional sharp
```

### Run with Llama
Expand All @@ -68,7 +68,7 @@ If you are getting strange issues when starting up, make sure you're using Node
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:

```
npm install --include=optional sharp
pnpm install --include=optional sharp
```

# Environment Setup
Expand All @@ -95,7 +95,7 @@ TWITTER_COOKIES= # Account cookies
If you have an NVIDIA GPU, you can install CUDA to speed up local inference dramatically.

```
npm install
pnpm install
npx --no node-llama-cpp source download --gpu cuda
```

Expand Down
6 changes: 3 additions & 3 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
You might need these

```
npm install --include=optional sharp
pnpm install --include=optional sharp
```

### Run with Llama
Expand All @@ -68,7 +68,7 @@ If you are getting strange issues when starting up, make sure you're using Node
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:

```
npm install --include=optional sharp
pnpm install --include=optional sharp
```

# Environment Setup
Expand All @@ -95,7 +95,7 @@ TWITTER_COOKIES= # Account cookies
If you have an NVIDIA GPU, you can install CUDA to speed up local inference dramatically.

```
npm install
pnpm install
npx --no node-llama-cpp source download --gpu cuda
```

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ sidebar_position: 3

Currently eliza is dependent on Supabase for local development. You can install it with the following command:

`npm install eliza`
`pnpm install eliza`

## Select your database adapter

```
npm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
pnpm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
npm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
pnpm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
```

### Set up environment variables
Expand Down Expand Up @@ -56,7 +56,7 @@ supabase init
supabase start
```

You can now start the eliza project with `npm run dev` and it will connect to the local Supabase instance by default.
You can now start the eliza project with `pnpm run dev` and it will connect to the local Supabase instance by default.

NOTE: You will need Docker installed for this to work. If that is an issue for you, use the Supabase Cloud Setup instructions instead below).

Expand Down Expand Up @@ -90,9 +90,9 @@ const runtime = new BgentRuntime({
### Development

```
npm run dev # start the server
pnpm run dev # start the server
npm run shell # start the shell in another terminal to talk to the default agent
pnpm run shell # start the shell in another terminal to talk to the default agent
```

### Usage
Expand Down
Loading

0 comments on commit d9aeb80

Please sign in to comment.