From 49e326a14f8cecb8f10f2fa17943d6291648d239 Mon Sep 17 00:00:00 2001 From: moon Date: Thu, 21 Mar 2024 14:22:36 -0700 Subject: [PATCH] Update documentation --- docs/docs/classes/BgentRuntime.md | 60 ++++++++++++++++++++ docs/docs/classes/SupabaseDatabaseAdapter.md | 6 ++ docs/docs/functions/formatGoalsAsString.md | 4 +- src/lib/runtime.ts | 3 +- 4 files changed, 70 insertions(+), 3 deletions(-) diff --git a/docs/docs/classes/BgentRuntime.md b/docs/docs/classes/BgentRuntime.md index 738c943..e1073f1 100644 --- a/docs/docs/classes/BgentRuntime.md +++ b/docs/docs/classes/BgentRuntime.md @@ -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. | @@ -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) diff --git a/docs/docs/classes/SupabaseDatabaseAdapter.md b/docs/docs/classes/SupabaseDatabaseAdapter.md index d0a7d1c..88e8982 100644 --- a/docs/docs/classes/SupabaseDatabaseAdapter.md +++ b/docs/docs/classes/SupabaseDatabaseAdapter.md @@ -33,6 +33,12 @@ custom_edit_url: null [DatabaseAdapter](DatabaseAdapter.md).[constructor](DatabaseAdapter.md#constructor) +## Properties + +### supabase + +• **supabase**: `default`\<`any`, ``"public"``, `any`\> + ## Methods ### addParticipantToRoom diff --git a/docs/docs/functions/formatGoalsAsString.md b/docs/docs/functions/formatGoalsAsString.md index 84f0bbc..dd1c2da 100644 --- a/docs/docs/functions/formatGoalsAsString.md +++ b/docs/docs/functions/formatGoalsAsString.md @@ -6,7 +6,7 @@ sidebar_position: 0 custom_edit_url: null --- -▸ **formatGoalsAsString**(`«destructured»`): `Promise`\<`string`\> +▸ **formatGoalsAsString**(`«destructured»`): `string` #### Parameters @@ -17,4 +17,4 @@ custom_edit_url: null #### Returns -`Promise`\<`string`\> +`string` diff --git a/src/lib/runtime.ts b/src/lib/runtime.ts index 3ae6781..f0a54c7 100644 --- a/src/lib/runtime.ts +++ b/src/lib/runtime.ts @@ -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;