Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Mar 21, 2024
1 parent 56bf823 commit 49e326a
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
60 changes: 60 additions & 0 deletions docs/docs/classes/BgentRuntime.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Creates an instance of BgentRuntime.
| `opts.debugMode?` | `boolean` | If true, debug messages will be logged. |
| `opts.embeddingModel?` | `string` | The model to use for embedding. |
| `opts.evaluators?` | [`Evaluator`](../interfaces/Evaluator.md)[] | Optional custom evaluators. |
| `opts.fetch?` | `unknown` | Custom fetch function to use for making requests. |
| `opts.model?` | `string` | The model to use for completion. |
| `opts.providers?` | [`Provider`](../interfaces/Provider.md)[] | Optional context providers. |
| `opts.recentMessageCount?` | `number` | The number of messages to hold in the recent message cache. |
Expand Down Expand Up @@ -104,6 +105,65 @@ Manage the fact and recall of facts.

___

### fetch

**fetch**: (`input`: `RequestInfo` \| `URL`, `init?`: `RequestInit`\<`CfProperties`\<`unknown`\>\>) => `Promise`\<`Response`\>(`input`: `RequestInfo`, `init?`: `RequestInit`\<`CfProperties`\<`unknown`\>\>) => `Promise`\<`Response`\>(`input`: `RequestInfo`, `init?`: `RequestInit`\<`RequestInitCfProperties`\>) => `Promise`\<`Response`\> = `fetch`

Fetch function to use
Some environments may not have access to the global fetch function and need a custom fetch override.

#### Type declaration

▸ (`input`, `init?`): `Promise`\<`Response`\>

Fetch function to use
Some environments may not have access to the global fetch function and need a custom fetch override.

##### Parameters

| Name | Type |
| :------ | :------ |
| `input` | `RequestInfo` \| `URL` |
| `init?` | `RequestInit`\<`CfProperties`\<`unknown`\>\> |

##### Returns

`Promise`\<`Response`\>

▸ (`input`, `init?`): `Promise`\<`Response`\>

Fetch function to use
Some environments may not have access to the global fetch function and need a custom fetch override.

##### Parameters

| Name | Type |
| :------ | :------ |
| `input` | `RequestInfo` |
| `init?` | `RequestInit`\<`CfProperties`\<`unknown`\>\> |

##### Returns

`Promise`\<`Response`\>

▸ (`input`, `init?`): `Promise`\<`Response`\>

Fetch function to use
Some environments may not have access to the global fetch function and need a custom fetch override.

##### Parameters

| Name | Type |
| :------ | :------ |
| `input` | `RequestInfo` |
| `init?` | `RequestInit`\<`RequestInitCfProperties`\> |

##### Returns

`Promise`\<`Response`\>

___

### loreManager

**loreManager**: [`MemoryManager`](MemoryManager.md)
Expand Down
6 changes: 6 additions & 0 deletions docs/docs/classes/SupabaseDatabaseAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ custom_edit_url: null

[DatabaseAdapter](DatabaseAdapter.md).[constructor](DatabaseAdapter.md#constructor)

## Properties

### supabase

**supabase**: `default`\<`any`, ``"public"``, `any`\>

## Methods

### addParticipantToRoom
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/functions/formatGoalsAsString.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 0
custom_edit_url: null
---

**formatGoalsAsString**(`«destructured»`): `Promise`\<`string`\>
**formatGoalsAsString**(`«destructured»`): `string`

#### Parameters

Expand All @@ -17,4 +17,4 @@ custom_edit_url: null

#### Returns

`Promise`\<`string`\>
`string`
3 changes: 2 additions & 1 deletion src/lib/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export class BgentRuntime {
embeddingModel = "text-embedding-3-small";

/**
* Use a custom fetch
* Fetch function to use
* Some environments may not have access to the global fetch function and need a custom fetch override.
*/
fetch = fetch;

Expand Down

0 comments on commit 49e326a

Please sign in to comment.