Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Turborepo #670

Merged
merged 15 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
echo "NODE_ENV=test" >> packages/core/.env.test

- name: Run tests
run: cd packages/core && pnpm test:coverage
run: cd packages/core && pnpm test

- name: Build packages
run: pnpm run build

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
12 changes: 4 additions & 8 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
"main": "src/index.ts",
"type": "module",
"scripts": {
"start": "node --enable-source-maps --loader ts-node/esm src/index.ts",
"dev": "tsc && nodemon --watch src --watch ../core/dist --ext ts,json --exec 'node --enable-source-maps --loader ts-node/esm' src/index.ts",
"dev:debug": "tsc && nodemon --watch src --watch ../core/dist --ext ts,json --exec 'verbose=true node --enable-source-maps --loader ts-node/esm' src/index.ts",
"check-types": "tsc --noEmit",
"start:service:all": "pm2 start pnpm --name=\"all\" --restart-delay=3000 --max-restarts=10 -- run start:all",
"stop:service:all": "pm2 stop all",
"start:all": "node --loader ts-node/esm src/index.ts --characters=\"../characters/eliza.json\",\"../characters/degenspartan.json\",\"../characters/ruby.json\",\"../characters/pmairca.json\""
"start": "node --loader ts-node/esm src/index.ts",
"dev": "node --loader ts-node/esm src/index.ts",
"check-types": "tsc --noEmit"
},
"nodemonConfig": {
"watch": [
Expand Down Expand Up @@ -48,4 +44,4 @@
"ts-node": "10.9.2",
"tsup": "8.3.5"
}
}
}
30 changes: 15 additions & 15 deletions docs/api/classes/AgentRuntime.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ Searchable document fragments

#### Defined in

[packages/core/src/runtime.ts:370](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L370)
[packages/core/src/runtime.ts:375](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L375)

***

Expand All @@ -542,7 +542,7 @@ Searchable document fragments

#### Defined in

[packages/core/src/runtime.ts:434](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L434)
[packages/core/src/runtime.ts:439](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L439)

***

Expand All @@ -564,7 +564,7 @@ The number of recent messages to be kept in memory.

#### Defined in

[packages/core/src/runtime.ts:456](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L456)
[packages/core/src/runtime.ts:461](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L461)

***

Expand All @@ -590,7 +590,7 @@ The action to register.

#### Defined in

[packages/core/src/runtime.ts:464](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L464)
[packages/core/src/runtime.ts:469](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L469)

***

Expand All @@ -612,7 +612,7 @@ The evaluator to register.

#### Defined in

[packages/core/src/runtime.ts:473](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L473)
[packages/core/src/runtime.ts:478](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L478)

***

Expand All @@ -634,7 +634,7 @@ The context provider to register.

#### Defined in

[packages/core/src/runtime.ts:481](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L481)
[packages/core/src/runtime.ts:486](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L486)

***

Expand Down Expand Up @@ -666,7 +666,7 @@ The message to process.

#### Defined in

[packages/core/src/runtime.ts:490](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L490)
[packages/core/src/runtime.ts:495](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L495)

***

Expand Down Expand Up @@ -702,7 +702,7 @@ The results of the evaluation.

#### Defined in

[packages/core/src/runtime.ts:567](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L567)
[packages/core/src/runtime.ts:572](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L572)

***

Expand Down Expand Up @@ -734,7 +734,7 @@ An error if the participant cannot be added.

#### Defined in

[packages/core/src/runtime.ts:637](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L637)
[packages/core/src/runtime.ts:642](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L642)

***

Expand Down Expand Up @@ -770,7 +770,7 @@ The user name to ensure the existence of.

#### Defined in

[packages/core/src/runtime.ts:653](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L653)
[packages/core/src/runtime.ts:658](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L658)

***

Expand All @@ -794,7 +794,7 @@ The user name to ensure the existence of.

#### Defined in

[packages/core/src/runtime.ts:673](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L673)
[packages/core/src/runtime.ts:678](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L678)

***

Expand Down Expand Up @@ -824,7 +824,7 @@ The user name to ensure the existence of.

#### Defined in

[packages/core/src/runtime.ts:690](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L690)
[packages/core/src/runtime.ts:695](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L695)

***

Expand Down Expand Up @@ -855,7 +855,7 @@ An error if the room cannot be created.

#### Defined in

[packages/core/src/runtime.ts:726](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L726)
[packages/core/src/runtime.ts:731](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L731)

***

Expand Down Expand Up @@ -885,7 +885,7 @@ The state of the agent.

#### Defined in

[packages/core/src/runtime.ts:739](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L739)
[packages/core/src/runtime.ts:744](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L744)

***

Expand All @@ -907,4 +907,4 @@ The state of the agent.

#### Defined in

[packages/core/src/runtime.ts:1185](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L1185)
[packages/core/src/runtime.ts:1190](https://github.com/ai16z/eliza/blob/main/packages/core/src/runtime.ts#L1190)
6 changes: 3 additions & 3 deletions docs/api/enumerations/LoggingLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#### Defined in

[packages/core/src/types.ts:1115](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1115)
[packages/core/src/types.ts:1132](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1132)

***

Expand All @@ -20,7 +20,7 @@

#### Defined in

[packages/core/src/types.ts:1116](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1116)
[packages/core/src/types.ts:1133](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1133)

***

Expand All @@ -30,4 +30,4 @@

#### Defined in

[packages/core/src/types.ts:1117](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1117)
[packages/core/src/types.ts:1134](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1134)
16 changes: 8 additions & 8 deletions docs/api/enumerations/ServiceType.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#### Defined in

[packages/core/src/types.ts:1104](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1104)
[packages/core/src/types.ts:1121](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1121)

***

Expand All @@ -20,7 +20,7 @@

#### Defined in

[packages/core/src/types.ts:1105](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1105)
[packages/core/src/types.ts:1122](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1122)

***

Expand All @@ -30,7 +30,7 @@

#### Defined in

[packages/core/src/types.ts:1106](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1106)
[packages/core/src/types.ts:1123](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1123)

***

Expand All @@ -40,7 +40,7 @@

#### Defined in

[packages/core/src/types.ts:1107](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1107)
[packages/core/src/types.ts:1124](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1124)

***

Expand All @@ -50,7 +50,7 @@

#### Defined in

[packages/core/src/types.ts:1108](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1108)
[packages/core/src/types.ts:1125](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1125)

***

Expand All @@ -60,7 +60,7 @@

#### Defined in

[packages/core/src/types.ts:1109](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1109)
[packages/core/src/types.ts:1126](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1126)

***

Expand All @@ -70,7 +70,7 @@

#### Defined in

[packages/core/src/types.ts:1110](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1110)
[packages/core/src/types.ts:1127](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1127)

***

Expand All @@ -80,4 +80,4 @@

#### Defined in

[packages/core/src/types.ts:1111](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1111)
[packages/core/src/types.ts:1128](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L1128)
2 changes: 1 addition & 1 deletion docs/api/functions/configureSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Object containing environment variables

## Defined in

[packages/core/src/settings.ts:53](https://github.com/ai16z/eliza/blob/main/packages/core/src/settings.ts#L53)
[packages/core/src/settings.ts:69](https://github.com/ai16z/eliza/blob/main/packages/core/src/settings.ts#L69)
12 changes: 8 additions & 4 deletions docs/api/functions/embed.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

> **embed**(`runtime`, `input`): `Promise`\<`number`[]\>

Generate embeddings for input text using configured model provider
Gets embeddings from a remote API endpoint. Falls back to local BGE/384

## Parameters

• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md)

The agent runtime containing model configuration
The agent runtime context

• **input**: `string`

Expand All @@ -20,8 +20,12 @@ The text to generate embeddings for

`Promise`\<`number`[]\>

Array of embedding numbers
Array of embedding values

## Throws

If the API request fails

## Defined in

[packages/core/src/embedding.ts:103](https://github.com/ai16z/eliza/blob/main/packages/core/src/embedding.ts#L103)
[packages/core/src/embedding.ts:138](https://github.com/ai16z/eliza/blob/main/packages/core/src/embedding.ts#L138)
2 changes: 1 addition & 1 deletion docs/api/functions/findNearestEnvFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Path to the nearest .env file or null if not found

## Defined in

[packages/core/src/settings.ts:27](https://github.com/ai16z/eliza/blob/main/packages/core/src/settings.ts#L27)
[packages/core/src/settings.ts:43](https://github.com/ai16z/eliza/blob/main/packages/core/src/settings.ts#L43)
2 changes: 1 addition & 1 deletion docs/api/functions/generateCaption.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@

## Defined in

[packages/core/src/generation.ts:952](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L952)
[packages/core/src/generation.ts:956](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L956)
2 changes: 1 addition & 1 deletion docs/api/functions/generateImage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@

## Defined in

[packages/core/src/generation.ts:770](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L770)
[packages/core/src/generation.ts:771](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L771)
2 changes: 1 addition & 1 deletion docs/api/functions/generateMessageResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ The completed message.

## Defined in

[packages/core/src/generation.ts:730](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L730)
[packages/core/src/generation.ts:731](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L731)
2 changes: 1 addition & 1 deletion docs/api/functions/generateObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

## Defined in

[packages/core/src/generation.ts:646](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L646)
[packages/core/src/generation.ts:647](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L647)
2 changes: 1 addition & 1 deletion docs/api/functions/generateObjectArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

## Defined in

[packages/core/src/generation.ts:682](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L682)
[packages/core/src/generation.ts:683](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L683)
2 changes: 1 addition & 1 deletion docs/api/functions/generateObjectV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Configuration options for generating objects.

## Defined in

[packages/core/src/generation.ts:1009](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L1009)
[packages/core/src/generation.ts:1046](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L1046)
2 changes: 1 addition & 1 deletion docs/api/functions/generateShouldRespond.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Promise resolving to "RESPOND", "IGNORE", "STOP" or null

## Defined in

[packages/core/src/generation.ts:472](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L472)
[packages/core/src/generation.ts:473](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L473)
2 changes: 1 addition & 1 deletion docs/api/functions/generateText.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ The completed message.

## Defined in

[packages/core/src/generation.ts:50](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L50)
[packages/core/src/generation.ts:51](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L51)
2 changes: 1 addition & 1 deletion docs/api/functions/generateTextArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Promise resolving to an array of strings parsed from the model's response

## Defined in

[packages/core/src/generation.ts:610](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L610)
[packages/core/src/generation.ts:611](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L611)
2 changes: 1 addition & 1 deletion docs/api/functions/generateTrueOrFalse.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Promise resolving to a boolean value parsed from the model's response

## Defined in

[packages/core/src/generation.ts:555](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L555)
[packages/core/src/generation.ts:556](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L556)
19 changes: 19 additions & 0 deletions docs/api/functions/generateWebSearch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[@ai16z/eliza v0.1.4-alpha.3](../index.md) / generateWebSearch

# Function: generateWebSearch()

> **generateWebSearch**(`query`, `runtime`): `Promise`\<[`SearchResponse`](../type-aliases/SearchResponse.md)\>

## Parameters

• **query**: `string`

• **runtime**: [`IAgentRuntime`](../interfaces/IAgentRuntime.md)

## Returns

`Promise`\<[`SearchResponse`](../type-aliases/SearchResponse.md)\>

## Defined in

[packages/core/src/generation.ts:980](https://github.com/ai16z/eliza/blob/main/packages/core/src/generation.ts#L980)
Loading
Loading