diff --git a/.changeset/mean-cherries-compare.md b/.changeset/mean-cherries-compare.md new file mode 100644 index 0000000000000000000000000000000000000000..55005e14ae9a0c1389eef72389168f822d59acfa --- /dev/null +++ b/.changeset/mean-cherries-compare.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +Added Anthropic Claude support diff --git a/apps/docs/docs/api/classes/Anthropic.md b/apps/docs/docs/api/classes/Anthropic.md new file mode 100644 index 0000000000000000000000000000000000000000..bfbc4504621369d2f53f8b8e3fc561f50bf6ad7c --- /dev/null +++ b/apps/docs/docs/api/classes/Anthropic.md @@ -0,0 +1,183 @@ +--- +id: "Anthropic" +title: "Class: Anthropic" +sidebar_label: "Anthropic" +sidebar_position: 0 +custom_edit_url: null +--- + +Anthropic LLM implementation + +## Implements + +- [`LLM`](../interfaces/LLM.md) + +## Constructors + +### constructor + +• **new Anthropic**(`init?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `init?` | `Partial`<[`Anthropic`](Anthropic.md)\> | + +#### Defined in + +[llm/LLM.ts:343](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L343) + +## Properties + +### apiKey + +• `Optional` **apiKey**: `string` = `undefined` + +#### Defined in + +[llm/LLM.ts:336](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L336) + +___ + +### callbackManager + +• `Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md) + +#### Defined in + +[llm/LLM.ts:341](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L341) + +___ + +### maxRetries + +• **maxRetries**: `number` + +#### Defined in + +[llm/LLM.ts:337](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L337) + +___ + +### maxTokens + +• `Optional` **maxTokens**: `number` + +#### Defined in + +[llm/LLM.ts:333](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L333) + +___ + +### model + +• **model**: `string` + +#### Defined in + +[llm/LLM.ts:331](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L331) + +___ + +### session + +• **session**: `AnthropicSession` + +#### Defined in + +[llm/LLM.ts:339](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L339) + +___ + +### temperature + +• **temperature**: `number` + +#### Defined in + +[llm/LLM.ts:332](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L332) + +___ + +### timeout + +• `Optional` **timeout**: `number` + +#### Defined in + +[llm/LLM.ts:338](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L338) + +## Methods + +### chat + +▸ **chat**(`messages`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\> + +Get a chat response from the LLM + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | +| `parentEvent?` | [`Event`](../interfaces/Event.md) | + +#### Returns + +`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\> + +#### Implementation of + +[LLM](../interfaces/LLM.md).[chat](../interfaces/LLM.md#chat) + +#### Defined in + +[llm/LLM.ts:377](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L377) + +___ + +### complete + +▸ **complete**(`prompt`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\> + +Get a prompt completion from the LLM + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `prompt` | `string` | the prompt to complete | +| `parentEvent?` | [`Event`](../interfaces/Event.md) | - | + +#### Returns + +`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\> + +#### Implementation of + +[LLM](../interfaces/LLM.md).[complete](../interfaces/LLM.md#complete) + +#### Defined in + +[llm/LLM.ts:394](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L394) + +___ + +### mapMessagesToPrompt + +▸ **mapMessagesToPrompt**(`messages`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | + +#### Returns + +`string` + +#### Defined in + +[llm/LLM.ts:362](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L362) diff --git a/apps/docs/docs/api/classes/LlamaDeuce.md b/apps/docs/docs/api/classes/LlamaDeuce.md index 50b1740b2bf873bbf0aca000c814b1ffaa0780ba..01d7ebc744880b2592228d6406355a73aa32aa38 100644 --- a/apps/docs/docs/api/classes/LlamaDeuce.md +++ b/apps/docs/docs/api/classes/LlamaDeuce.md @@ -26,7 +26,7 @@ Llama2 LLM implementation #### Defined in -[llm/LLM.ts:198](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L198) +[llm/LLM.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L204) ## Properties @@ -36,7 +36,7 @@ Llama2 LLM implementation #### Defined in -[llm/LLM.ts:193](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L193) +[llm/LLM.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L199) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[llm/LLM.ts:195](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L195) +[llm/LLM.ts:201](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L201) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[llm/LLM.ts:192](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L192) +[llm/LLM.ts:198](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L198) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[llm/LLM.ts:196](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L196) +[llm/LLM.ts:202](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L202) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[llm/LLM.ts:194](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L194) +[llm/LLM.ts:200](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L200) ## Methods @@ -103,7 +103,7 @@ Get a chat response from the LLM #### Defined in -[llm/LLM.ts:288](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L288) +[llm/LLM.ts:294](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L294) ___ @@ -130,7 +130,7 @@ Get a prompt completion from the LLM #### Defined in -[llm/LLM.ts:311](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L311) +[llm/LLM.ts:317](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L317) ___ @@ -150,7 +150,7 @@ ___ #### Defined in -[llm/LLM.ts:229](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L229) +[llm/LLM.ts:235](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L235) ___ @@ -170,7 +170,7 @@ ___ #### Defined in -[llm/LLM.ts:206](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L206) +[llm/LLM.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L212) ___ @@ -190,7 +190,7 @@ ___ #### Defined in -[llm/LLM.ts:218](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L218) +[llm/LLM.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L224) ___ @@ -211,4 +211,4 @@ ___ #### Defined in -[llm/LLM.ts:242](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L242) +[llm/LLM.ts:248](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L248) diff --git a/apps/docs/docs/api/classes/OpenAI.md b/apps/docs/docs/api/classes/OpenAI.md index 9b5c2f27a4482a279d1e723a457d5a71c7ea783e..3b8a6015c7bee49f3a3a198c6a19261907614278 100644 --- a/apps/docs/docs/api/classes/OpenAI.md +++ b/apps/docs/docs/api/classes/OpenAI.md @@ -26,7 +26,7 @@ OpenAI LLM implementation #### Defined in -[llm/LLM.ts:80](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L80) +[llm/LLM.ts:86](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L86) ## Properties @@ -36,7 +36,7 @@ OpenAI LLM implementation #### Defined in -[llm/LLM.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L73) +[llm/LLM.ts:79](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L79) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[llm/LLM.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L78) +[llm/LLM.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L84) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[llm/LLM.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L74) +[llm/LLM.ts:80](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L80) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[llm/LLM.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L70) +[llm/LLM.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L76) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[llm/LLM.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L68) +[llm/LLM.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L74) ___ @@ -86,7 +86,7 @@ ___ #### Defined in -[llm/LLM.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L76) +[llm/LLM.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L82) ___ @@ -96,7 +96,7 @@ ___ #### Defined in -[llm/LLM.ts:69](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L69) +[llm/LLM.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L75) ___ @@ -106,7 +106,7 @@ ___ #### Defined in -[llm/LLM.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L75) +[llm/LLM.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L81) ## Methods @@ -133,7 +133,7 @@ Get a chat response from the LLM #### Defined in -[llm/LLM.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L116) +[llm/LLM.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L122) ___ @@ -160,7 +160,7 @@ Get a prompt completion from the LLM #### Defined in -[llm/LLM.ts:154](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L154) +[llm/LLM.ts:160](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L160) ___ @@ -180,4 +180,4 @@ ___ #### Defined in -[llm/LLM.ts:99](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L99) +[llm/LLM.ts:105](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L105) diff --git a/apps/docs/docs/api/enums/DeuceChatStrategy.md b/apps/docs/docs/api/enums/DeuceChatStrategy.md index 5d2d3262c48a6f0692724cfc39a01e8143fa0d32..715783a385d151fa8f2e8c5b160da6b3ce4992f7 100644 --- a/apps/docs/docs/api/enums/DeuceChatStrategy.md +++ b/apps/docs/docs/api/enums/DeuceChatStrategy.md @@ -14,7 +14,7 @@ custom_edit_url: null #### Defined in -[llm/LLM.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L181) +[llm/LLM.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L187) ___ @@ -24,7 +24,7 @@ ___ #### Defined in -[llm/LLM.ts:182](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L182) +[llm/LLM.ts:188](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L188) ___ @@ -34,4 +34,4 @@ ___ #### Defined in -[llm/LLM.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L183) +[llm/LLM.ts:189](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L189) diff --git a/apps/docs/docs/api/interfaces/ChatMessage.md b/apps/docs/docs/api/interfaces/ChatMessage.md index 6600cbc0a775054178260119066cefb1aa33949e..1a4eaae9a4f364c262e3feccebfbfb435db1faf8 100644 --- a/apps/docs/docs/api/interfaces/ChatMessage.md +++ b/apps/docs/docs/api/interfaces/ChatMessage.md @@ -14,7 +14,7 @@ custom_edit_url: null #### Defined in -[llm/LLM.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L15) +[llm/LLM.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L21) ___ @@ -24,4 +24,4 @@ ___ #### Defined in -[llm/LLM.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L16) +[llm/LLM.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L22) diff --git a/apps/docs/docs/api/interfaces/ChatResponse.md b/apps/docs/docs/api/interfaces/ChatResponse.md index 207cac15f3e39b67fa56147197dcb2bfed72844b..104722024c1784925f11fb7fc9286eea175f3289 100644 --- a/apps/docs/docs/api/interfaces/ChatResponse.md +++ b/apps/docs/docs/api/interfaces/ChatResponse.md @@ -14,7 +14,7 @@ custom_edit_url: null #### Defined in -[llm/LLM.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L22) +[llm/LLM.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L28) ___ @@ -24,7 +24,7 @@ ___ #### Defined in -[llm/LLM.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L20) +[llm/LLM.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L26) ___ @@ -34,4 +34,4 @@ ___ #### Defined in -[llm/LLM.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L21) +[llm/LLM.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L27) diff --git a/apps/docs/docs/api/interfaces/LLM.md b/apps/docs/docs/api/interfaces/LLM.md index a7cba1bcd645b972515665be5837d0ee0de9031a..798e1802b4b3d1fbbdf4463476c3051f59affd73 100644 --- a/apps/docs/docs/api/interfaces/LLM.md +++ b/apps/docs/docs/api/interfaces/LLM.md @@ -10,6 +10,7 @@ Unified language model interface ## Implemented by +- [`Anthropic`](../classes/Anthropic.md) - [`LlamaDeuce`](../classes/LlamaDeuce.md) - [`OpenAI`](../classes/OpenAI.md) @@ -34,7 +35,7 @@ Get a chat response from the LLM #### Defined in -[llm/LLM.ts:36](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L36) +[llm/LLM.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L42) ___ @@ -57,4 +58,4 @@ Get a prompt completion from the LLM #### Defined in -[llm/LLM.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L42) +[llm/LLM.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L48) diff --git a/apps/docs/docs/api/interfaces/ServiceContextOptions.md b/apps/docs/docs/api/interfaces/ServiceContextOptions.md index f83e2f836a45b60e6fb1293eccd4a8b3c61c3b1d..161228facb0b195c8d728b639c68eb75b62f2bad 100644 --- a/apps/docs/docs/api/interfaces/ServiceContextOptions.md +++ b/apps/docs/docs/api/interfaces/ServiceContextOptions.md @@ -50,7 +50,7 @@ ___ ### llm -• `Optional` **llm**: [`OpenAI`](../classes/OpenAI.md) +• `Optional` **llm**: [`LLM`](LLM.md) #### Defined in diff --git a/apps/docs/docs/api/modules.md b/apps/docs/docs/api/modules.md index f29d279f260698ca74a8f4ae8985d036835e4e0d..8aefb1d83eec543063c7bcb94e163b006dfde3d0 100644 --- a/apps/docs/docs/api/modules.md +++ b/apps/docs/docs/api/modules.md @@ -18,6 +18,7 @@ custom_edit_url: null ## Classes +- [Anthropic](classes/Anthropic.md) - [BaseEmbedding](classes/BaseEmbedding.md) - [BaseIndex](classes/BaseIndex.md) - [BaseNode](classes/BaseNode.md) @@ -107,7 +108,7 @@ ___ #### Defined in -[llm/LLM.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L26) +[llm/LLM.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L32) ___ @@ -137,7 +138,7 @@ ___ #### Defined in -[llm/LLM.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L7) +[llm/LLM.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L13) ___ @@ -218,7 +219,7 @@ NOTE 2: we default to empty string to make it easy to calculate prompt sizes #### Defined in -[llm/LLM.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L162) +[llm/LLM.ts:168](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L168) ___ @@ -243,7 +244,7 @@ We currently support GPT-3.5 and GPT-4 models #### Defined in -[llm/LLM.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L58) +[llm/LLM.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L64) ___ @@ -422,7 +423,7 @@ ___ #### Defined in -[llm/LLM.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L45) +[llm/LLM.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L51) ___ @@ -441,7 +442,7 @@ ___ #### Defined in -[llm/LLM.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L50) +[llm/LLM.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L56) ___ diff --git a/apps/simple/anthropic.ts b/apps/simple/anthropic.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae4eab14be13006b9f5b40987254c431ec663539 --- /dev/null +++ b/apps/simple/anthropic.ts @@ -0,0 +1,16 @@ +import { Anthropic } from "llamaindex"; + +(async () => { + const anthropic = new Anthropic(); + const result = await anthropic.chat([ + { content: "You want to talk in rhymes.", role: "system" }, + { content: "Hello, world!", role: "user" }, + { content: "Hello!", role: "assistant" }, + { + content: + "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", + role: "user", + }, + ]); + console.log(result); +})(); diff --git a/apps/simple/vectorIndexAnthropic.ts b/apps/simple/vectorIndexAnthropic.ts new file mode 100644 index 0000000000000000000000000000000000000000..2db6645c88a31054ffcc527991f3e61a8ee0c137 --- /dev/null +++ b/apps/simple/vectorIndexAnthropic.ts @@ -0,0 +1,35 @@ +import fs from "fs/promises"; +import { + Anthropic, + Document, + VectorStoreIndex, + serviceContextFromDefaults, +} from "llamaindex"; + +async function main() { + // Load essay from abramov.txt in Node + const essay = await fs.readFile( + "node_modules/llamaindex/examples/abramov.txt", + "utf-8" + ); + + // Create Document object with essay + const document = new Document({ text: essay }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const serviceContext = serviceContextFromDefaults({ llm: new Anthropic() }); + const index = await VectorStoreIndex.fromDocuments([document], { + serviceContext, + }); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query( + "What did the author do in college?" + ); + + // Output response + console.log(response.toString()); +} + +main().catch(console.error); diff --git a/apps/simple/vectorIndexGPT4.ts b/apps/simple/vectorIndexGPT4.ts new file mode 100644 index 0000000000000000000000000000000000000000..69f0f349f78ccb38f98279edb9e5486ccb4d1c80 --- /dev/null +++ b/apps/simple/vectorIndexGPT4.ts @@ -0,0 +1,37 @@ +import fs from "fs/promises"; +import { + OpenAI, + Document, + VectorStoreIndex, + serviceContextFromDefaults, +} from "llamaindex"; + +async function main() { + // Load essay from abramov.txt in Node + const essay = await fs.readFile( + "node_modules/llamaindex/examples/abramov.txt", + "utf-8" + ); + + // Create Document object with essay + const document = new Document({ text: essay }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const serviceContext = serviceContextFromDefaults({ + llm: new OpenAI({ model: "gpt-4" }), + }); + const index = await VectorStoreIndex.fromDocuments([document], { + serviceContext, + }); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query( + "What did the author do in college?" + ); + + // Output response + console.log(response.toString()); +} + +main().catch(console.error); diff --git a/examples/anthropic.ts b/examples/anthropic.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae4eab14be13006b9f5b40987254c431ec663539 --- /dev/null +++ b/examples/anthropic.ts @@ -0,0 +1,16 @@ +import { Anthropic } from "llamaindex"; + +(async () => { + const anthropic = new Anthropic(); + const result = await anthropic.chat([ + { content: "You want to talk in rhymes.", role: "system" }, + { content: "Hello, world!", role: "user" }, + { content: "Hello!", role: "assistant" }, + { + content: + "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", + role: "user", + }, + ]); + console.log(result); +})(); diff --git a/examples/vectorIndexAnthropic.ts b/examples/vectorIndexAnthropic.ts new file mode 100644 index 0000000000000000000000000000000000000000..2db6645c88a31054ffcc527991f3e61a8ee0c137 --- /dev/null +++ b/examples/vectorIndexAnthropic.ts @@ -0,0 +1,35 @@ +import fs from "fs/promises"; +import { + Anthropic, + Document, + VectorStoreIndex, + serviceContextFromDefaults, +} from "llamaindex"; + +async function main() { + // Load essay from abramov.txt in Node + const essay = await fs.readFile( + "node_modules/llamaindex/examples/abramov.txt", + "utf-8" + ); + + // Create Document object with essay + const document = new Document({ text: essay }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const serviceContext = serviceContextFromDefaults({ llm: new Anthropic() }); + const index = await VectorStoreIndex.fromDocuments([document], { + serviceContext, + }); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query( + "What did the author do in college?" + ); + + // Output response + console.log(response.toString()); +} + +main().catch(console.error); diff --git a/examples/vectorIndexGPT4.ts b/examples/vectorIndexGPT4.ts new file mode 100644 index 0000000000000000000000000000000000000000..69f0f349f78ccb38f98279edb9e5486ccb4d1c80 --- /dev/null +++ b/examples/vectorIndexGPT4.ts @@ -0,0 +1,37 @@ +import fs from "fs/promises"; +import { + OpenAI, + Document, + VectorStoreIndex, + serviceContextFromDefaults, +} from "llamaindex"; + +async function main() { + // Load essay from abramov.txt in Node + const essay = await fs.readFile( + "node_modules/llamaindex/examples/abramov.txt", + "utf-8" + ); + + // Create Document object with essay + const document = new Document({ text: essay }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const serviceContext = serviceContextFromDefaults({ + llm: new OpenAI({ model: "gpt-4" }), + }); + const index = await VectorStoreIndex.fromDocuments([document], { + serviceContext, + }); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query( + "What did the author do in college?" + ); + + // Output response + console.log(response.toString()); +} + +main().catch(console.error); diff --git a/package.json b/package.json index 79ca95796aa32d358480012508f5cf43ae910f93..12742b4984c1dcf388d8ec5e4de8632904053439 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "lint": "turbo run lint", "prepare": "husky install", "test": "turbo run test", - "publish-packages": "turbo run build lint test && changeset version && changeset publish" + "publish-packages": "turbo run build lint test && changeset version && changeset publish", + "publish-snapshot": "turbo run build lint test && changeset version snapshot && changeset publish" }, "devDependencies": { "@turbo/gen": "^1.10.12", diff --git a/packages/core/package.json b/packages/core/package.json index 9b8f8eb4414a307325b5fbf30bdb3e1fcc8a54e4..43940b436a050320e2ebc73f89739590a601654b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,6 +2,7 @@ "name": "llamaindex", "version": "0.0.14", "dependencies": { + "@anthropic-ai/sdk": "^0.5.8", "js-tiktoken": "^1.0.7", "lodash": "^4.17.21", "openai": "4.0.0-beta.6", diff --git a/packages/core/src/ServiceContext.ts b/packages/core/src/ServiceContext.ts index 92a567b9bf9ad2112c7ebaa1d8674e29a72e9a38..c6b935a441f1fe5f9cde337488e206907d671550 100644 --- a/packages/core/src/ServiceContext.ts +++ b/packages/core/src/ServiceContext.ts @@ -17,7 +17,7 @@ export interface ServiceContext { } export interface ServiceContextOptions { - llm?: OpenAI; + llm?: LLM; promptHelper?: PromptHelper; embedModel?: BaseEmbedding; nodeParser?: NodeParser; diff --git a/packages/core/src/llm/LLM.ts b/packages/core/src/llm/LLM.ts index c85c02b19307d0ee696c6e5c3f9fa5d3826bfa95..d69453ee5a00585e37b06227bdf86153390e7f12 100644 --- a/packages/core/src/llm/LLM.ts +++ b/packages/core/src/llm/LLM.ts @@ -3,6 +3,12 @@ import { handleOpenAIStream } from "../callbacks/utility/handleOpenAIStream"; import { OpenAISession, getOpenAISession } from "./openai"; import OpenAILLM from "openai"; import { ReplicateSession } from "./replicate"; +import { + ANTHROPIC_AI_PROMPT, + ANTHROPIC_HUMAN_PROMPT, + AnthropicSession, + getAnthropicSession, +} from "./anthropic"; export type MessageType = | "user" @@ -315,3 +321,80 @@ If a question does not make any sense, or is not factually coherent, explain why return this.chat([{ content: prompt, role: "user" }], parentEvent); } } + +/** + * Anthropic LLM implementation + */ + +export class Anthropic implements LLM { + // Per completion Anthropic params + model: string; + temperature: number; + maxTokens?: number; + + // Anthropic session params + apiKey?: string = undefined; + maxRetries: number; + timeout?: number; + session: AnthropicSession; + + callbackManager?: CallbackManager; + + constructor(init?: Partial<Anthropic>) { + this.model = init?.model ?? "claude-2"; + this.temperature = init?.temperature ?? 0; + this.maxTokens = init?.maxTokens ?? undefined; + + this.apiKey = init?.apiKey ?? undefined; + this.maxRetries = init?.maxRetries ?? 10; + this.timeout = init?.timeout ?? undefined; // Default is 60 seconds + this.session = + init?.session ?? + getAnthropicSession({ + apiKey: this.apiKey, + maxRetries: this.maxRetries, + timeout: this.timeout, + }); + + this.callbackManager = init?.callbackManager; + } + + mapMessagesToPrompt(messages: ChatMessage[]) { + return ( + messages.reduce((acc, message) => { + return ( + acc + + `${ + message.role === "assistant" + ? ANTHROPIC_AI_PROMPT + : ANTHROPIC_HUMAN_PROMPT + } ${message.content} ` + ); + }, "") + ANTHROPIC_AI_PROMPT + ); + } + + async chat( + messages: ChatMessage[], + parentEvent?: Event | undefined + ): Promise<ChatResponse> { + const response = await this.session.anthropic.completions.create({ + model: this.model, + prompt: this.mapMessagesToPrompt(messages), + max_tokens_to_sample: this.maxTokens ?? 100000, + temperature: this.temperature, + }); + + return { + message: { content: response.completion.trimStart(), role: "assistant" }, + //^ We're trimming the start because Anthropic often starts with a space in the response + // That space will be re-added when we generate the next prompt. + }; + } + async complete( + prompt: string, + parentEvent?: Event | undefined + ): Promise<CompletionResponse> { + return this.chat([{ content: prompt, role: "user" }], parentEvent); + } +} diff --git a/packages/core/src/llm/anthropic.ts b/packages/core/src/llm/anthropic.ts new file mode 100644 index 0000000000000000000000000000000000000000..846089d10999f23d0f6f64da9632d1c6b717b939 --- /dev/null +++ b/packages/core/src/llm/anthropic.ts @@ -0,0 +1,54 @@ +import Anthropic, { + ClientOptions, + AI_PROMPT, + HUMAN_PROMPT, +} from "@anthropic-ai/sdk"; +import _ from "lodash"; + +export class AnthropicSession { + anthropic: Anthropic; + + constructor(options: ClientOptions = {}) { + if (!options.apiKey) { + if (typeof process !== undefined) { + options.apiKey = process.env.ANTHROPIC_API_KEY; + } + } + + if (!options.apiKey) { + throw new Error("Set Anthropic Key in ANTHROPIC_API_KEY env variable"); // Overriding Anthropic package's error message + } + + this.anthropic = new Anthropic(options); + } +} + +// I'm not 100% sure this is necessary vs. just starting a new session +// every time we make a call. They say they try to reuse connections +// so in theory this is more efficient, but we should test it in the future. +let defaultAnthropicSession: { + session: AnthropicSession; + options: ClientOptions; +}[] = []; + +/** + * Get a session for the Anthropic API. If one already exists with the same options, + * it will be returned. Otherwise, a new session will be created. + * @param options + * @returns + */ +export function getAnthropicSession(options: ClientOptions = {}) { + let session = defaultAnthropicSession.find((session) => { + return _.isEqual(session.options, options); + })?.session; + + if (!session) { + session = new AnthropicSession(options); + defaultAnthropicSession.push({ session, options }); + } + + return session; +} + +export const ANTHROPIC_HUMAN_PROMPT = HUMAN_PROMPT; +export const ANTHROPIC_AI_PROMPT = AI_PROMPT; diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index 905dec0c46fb38764d68948d09109e704d275822..20c0632758bf78b971aac05b73d1378b6cc8784f 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -8,6 +8,7 @@ module.exports = { allowList: [ "OPENAI_API_KEY", "REPLICATE_API_TOKEN", + "ANTHROPIC_API_KEY", "DEBUG", "no_proxy", "NO_PROXY", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 68d3eaa03f29d63f249b3906e1df8a166aba6bb3..b43c4642d0aae9fa5579b3ff6d64add7952ec64d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ importers: devDependencies: '@turbo/gen': specifier: ^1.10.12 - version: 1.10.12(@types/node@20.4.5)(typescript@5.1.6) + version: 1.10.12(@types/node@18.17.1)(typescript@4.9.5) '@types/jest': specifier: ^29.5.3 version: 29.5.3 @@ -29,7 +29,7 @@ importers: version: 8.0.3 jest: specifier: ^29.6.1 - version: 29.6.1(@types/node@20.4.5) + version: 29.6.1(@types/node@18.17.1) prettier: specifier: ^2.8.8 version: 2.8.8 @@ -38,7 +38,7 @@ importers: version: 0.3.0(prettier@2.8.8) ts-jest: specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.22.9)(jest@29.6.1)(typescript@5.1.6) + version: 29.1.1(@babel/core@7.22.9)(jest@29.6.1)(typescript@4.9.5) turbo: specifier: ^1.10.12 version: 1.10.12 @@ -110,6 +110,9 @@ importers: packages/core: dependencies: + '@anthropic-ai/sdk': + specifier: ^0.5.8 + version: 0.5.8 js-tiktoken: specifier: ^1.0.7 version: 1.0.7 @@ -152,22 +155,22 @@ importers: version: 1.2.0 tsup: specifier: ^7.1.0 - version: 7.1.0(typescript@5.1.6) + version: 7.1.0(typescript@4.9.5) packages/eslint-config-custom: dependencies: eslint-config-next: specifier: ^13.4.1 - version: 13.4.1(eslint@8.45.0)(typescript@5.1.6) + version: 13.4.1(eslint@7.32.0)(typescript@4.9.5) eslint-config-prettier: specifier: ^8.3.0 - version: 8.8.0(eslint@8.45.0) + version: 8.8.0(eslint@7.32.0) eslint-config-turbo: specifier: ^1.9.3 - version: 1.9.3(eslint@8.45.0) + version: 1.9.3(eslint@7.32.0) eslint-plugin-react: specifier: 7.28.0 - version: 7.28.0(eslint@8.45.0) + version: 7.28.0(eslint@7.32.0) devDependencies: next: specifier: ^13.4.10 @@ -326,6 +329,22 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 + /@anthropic-ai/sdk@0.5.8: + resolution: {integrity: sha512-iHenjcE2Q/az6VZiP1DueOSvKNRmxsly6Rx2yjJBoy7OBYVFGVjEdgs2mPQHtTX0ibKAR7tPq6F6MQbKDPWcKg==} + dependencies: + '@types/node': 18.17.1 + '@types/node-fetch': 2.6.4 + abort-controller: 3.0.0 + agentkeepalive: 4.3.0 + digest-fetch: 1.3.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.6.12 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /@babel/code-frame@7.12.11: resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} dependencies: @@ -2896,21 +2915,6 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.45.0 - eslint-visitor-keys: 3.4.1 - dev: false - - /@eslint-community/regexpp@4.6.2: - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: false - /@eslint/eslintrc@0.4.3: resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2927,28 +2931,6 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.6.1 - globals: 13.20.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: false - - /@eslint/js@8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: false - /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -2957,17 +2939,6 @@ packages: dependencies: '@hapi/hoek': 9.3.0 - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: false - /@humanwhocodes/config-array@0.5.0: resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} engines: {node: '>=10.10.0'} @@ -2978,11 +2949,6 @@ packages: transitivePeerDependencies: - supports-color - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: false - /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} @@ -3007,7 +2973,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 chalk: 4.1.2 jest-message-util: 29.6.1 jest-util: 29.6.1 @@ -3062,7 +3028,7 @@ packages: dependencies: '@jest/fake-timers': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 jest-mock: 29.6.1 dev: true @@ -3089,7 +3055,7 @@ packages: dependencies: '@jest/types': 29.6.1 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.4.5 + '@types/node': 18.17.1 jest-message-util: 29.6.1 jest-mock: 29.6.1 jest-util: 29.6.1 @@ -3122,7 +3088,7 @@ packages: '@jest/transform': 29.6.1 '@jest/types': 29.6.1 '@jridgewell/trace-mapping': 0.3.18 - '@types/node': 20.4.5 + '@types/node': 18.17.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3685,7 +3651,7 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - /@turbo/gen@1.10.12(@types/node@20.4.5)(typescript@5.1.6): + /@turbo/gen@1.10.12(@types/node@18.17.1)(typescript@4.9.5): resolution: {integrity: sha512-noop5+3MBFsgPQ7O2vQpS6YYiah+ZrOioa4cDDpZceUVsKVXvUHFmC2nEVyKSJZhO/8SLvbDE/esB/MGw5b2tw==} hasBin: true dependencies: @@ -3697,7 +3663,7 @@ packages: node-plop: 0.26.3 proxy-agent: 6.3.0 semver: 7.5.4 - ts-node: 10.9.1(@types/node@20.4.5)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@18.17.1)(typescript@4.9.5) update-check: 1.5.4 validate-npm-package-name: 5.0.0 transitivePeerDependencies: @@ -3741,26 +3707,26 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/bonjour@3.5.10: resolution: {integrity: sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/connect-history-api-fallback@1.5.0: resolution: {integrity: sha512-4x5FkPpLipqwthjPsF7ZRbOv3uoLUFkTA9G9v583qi4pACvq0uTELrB8OLUzPWUI4IJIyvM85vzkV1nyiI2Lig==} dependencies: '@types/express-serve-static-core': 4.17.35 - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/eslint-scope@3.7.4: @@ -3781,7 +3747,7 @@ packages: /@types/express-serve-static-core@4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -3800,13 +3766,13 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: true /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: true /@types/hast@2.3.5: @@ -3829,7 +3795,7 @@ packages: /@types/http-proxy@1.17.11: resolution: {integrity: sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/inquirer@6.5.0: @@ -3875,7 +3841,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/lodash@4.14.196: @@ -3990,7 +3956,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/retry@0.12.0: @@ -4000,7 +3966,7 @@ packages: /@types/sax@1.2.4: resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} dependencies: - '@types/node': 17.0.45 + '@types/node': 18.17.1 dev: false /@types/scheduler@0.16.3: @@ -4014,7 +3980,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/serve-index@1.9.1: @@ -4028,13 +3994,13 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/sockjs@0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/stack-utils@2.0.1: @@ -4044,7 +4010,7 @@ packages: /@types/through@0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: true /@types/unist@2.0.7: @@ -4058,7 +4024,7 @@ packages: /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 dev: false /@types/yargs-parser@21.0.0: @@ -4069,7 +4035,7 @@ packages: dependencies: '@types/yargs-parser': 21.0.0 - /@typescript-eslint/parser@5.59.2(eslint@8.45.0)(typescript@5.1.6): + /@typescript-eslint/parser@5.59.2(eslint@7.32.0)(typescript@4.9.5): resolution: {integrity: sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4081,10 +4047,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.59.2 '@typescript-eslint/types': 5.59.2 - '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 5.59.2(typescript@4.9.5) debug: 4.3.4 - eslint: 8.45.0 - typescript: 5.1.6 + eslint: 7.32.0 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: false @@ -4102,7 +4068,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /@typescript-eslint/typescript-estree@5.59.2(typescript@5.1.6): + /@typescript-eslint/typescript-estree@5.59.2(typescript@4.9.5): resolution: {integrity: sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4117,8 +4083,8 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@5.1.6) - typescript: 5.1.6 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: false @@ -4257,14 +4223,6 @@ packages: dependencies: acorn: 7.4.1 - /acorn-jsx@5.3.2(acorn@8.10.0): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.10.0 - dev: false - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} @@ -6557,7 +6515,7 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-next@13.4.1(eslint@8.45.0)(typescript@5.1.6): + /eslint-config-next@13.4.1(eslint@7.32.0)(typescript@4.9.5): resolution: {integrity: sha512-ajuxjCkW1hvirr0EQZb3/B/bFH52Z7CT89uCtTcICFL9l30i5c8hN4p0LXvTjdOXNPV5fEDcxBgGHgXdzTj1/A==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 @@ -6568,36 +6526,36 @@ packages: dependencies: '@next/eslint-plugin-next': 13.4.1 '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/parser': 5.59.2(eslint@8.45.0)(typescript@5.1.6) - eslint: 8.45.0 + '@typescript-eslint/parser': 5.59.2(eslint@7.32.0)(typescript@4.9.5) + eslint: 7.32.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.45.0) - eslint-plugin-react: 7.32.2(eslint@8.45.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.45.0) - typescript: 5.1.6 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@7.32.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@7.32.0) + eslint-plugin-react: 7.32.2(eslint@7.32.0) + eslint-plugin-react-hooks: 4.6.0(eslint@7.32.0) + typescript: 4.9.5 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color dev: false - /eslint-config-prettier@8.8.0(eslint@8.45.0): + /eslint-config-prettier@8.8.0(eslint@7.32.0): resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.45.0 + eslint: 7.32.0 dev: false - /eslint-config-turbo@1.9.3(eslint@8.45.0): + /eslint-config-turbo@1.9.3(eslint@7.32.0): resolution: {integrity: sha512-QG6jxFQkrGSpQqlFKefPdtgUfr20EbU0s4tGGIuGFOcPuJEdsY6VYZpZUxNJvmMcTGqPgMyOPjAFBKhy/DPHLA==} peerDependencies: eslint: '>6.6.0' dependencies: - eslint: 8.45.0 - eslint-plugin-turbo: 1.9.3(eslint@8.45.0) + eslint: 7.32.0 + eslint-plugin-turbo: 1.9.3(eslint@7.32.0) dev: false /eslint-import-resolver-node@0.3.7: @@ -6610,7 +6568,7 @@ packages: - supports-color dev: false - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.45.0): + /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@7.32.0): resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -6619,9 +6577,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.13.0 - eslint: 8.45.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + eslint: 7.32.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0) get-tsconfig: 4.5.0 globby: 13.1.4 is-core-module: 2.12.0 @@ -6634,7 +6592,7 @@ packages: - supports-color dev: false - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -6655,16 +6613,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.2(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.2(eslint@7.32.0)(typescript@4.9.5) debug: 3.2.7 - eslint: 8.45.0 + eslint: 7.32.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.45.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@7.32.0) transitivePeerDependencies: - supports-color dev: false - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): + /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0): resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -6674,15 +6632,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.2(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.2(eslint@7.32.0)(typescript@4.9.5) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 7.32.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@7.32.0) has: 1.0.3 is-core-module: 2.12.0 is-glob: 4.0.3 @@ -6697,7 +6655,7 @@ packages: - supports-color dev: false - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.45.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@7.32.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -6712,7 +6670,7 @@ packages: axobject-query: 3.1.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.45.0 + eslint: 7.32.0 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -6722,16 +6680,16 @@ packages: semver: 6.3.0 dev: false - /eslint-plugin-react-hooks@4.6.0(eslint@8.45.0): + /eslint-plugin-react-hooks@4.6.0(eslint@7.32.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.45.0 + eslint: 7.32.0 dev: false - /eslint-plugin-react@7.28.0(eslint@8.45.0): + /eslint-plugin-react@7.28.0(eslint@7.32.0): resolution: {integrity: sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==} engines: {node: '>=4'} peerDependencies: @@ -6740,7 +6698,7 @@ packages: array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 7.32.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -6754,7 +6712,7 @@ packages: string.prototype.matchall: 4.0.8 dev: false - /eslint-plugin-react@7.32.2(eslint@8.45.0): + /eslint-plugin-react@7.32.2(eslint@7.32.0): resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'} peerDependencies: @@ -6764,7 +6722,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 7.32.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -6778,12 +6736,12 @@ packages: string.prototype.matchall: 4.0.8 dev: false - /eslint-plugin-turbo@1.9.3(eslint@8.45.0): + /eslint-plugin-turbo@1.9.3(eslint@7.32.0): resolution: {integrity: sha512-ZsRtksdzk3v+z5/I/K4E50E4lfZ7oYmLX395gkrUMBz4/spJlYbr+GC8hP9oVNLj9s5Pvnm9rLv/zoj5PVYaVw==} peerDependencies: eslint: '>6.6.0' dependencies: - eslint: 8.45.0 + eslint: 7.32.0 dev: false /eslint-scope@5.1.1: @@ -6793,14 +6751,6 @@ packages: esrecurse: 4.3.0 estraverse: 4.3.0 - /eslint-scope@7.2.1: - resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: false - /eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} engines: {node: '>=6'} @@ -6820,11 +6770,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: false - /eslint@7.32.0: resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} engines: {node: ^10.12.0 || >=12.0.0} @@ -6873,52 +6818,6 @@ packages: transitivePeerDependencies: - supports-color - /eslint@8.45.0: - resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@eslint-community/regexpp': 4.6.2 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.44.0 - '@humanwhocodes/config-array': 0.11.10 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.1 - eslint-visitor-keys: 3.4.1 - espree: 9.6.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.20.0 - graphemer: 1.4.0 - ignore: 5.2.4 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.3 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: false - /espree@7.3.1: resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} engines: {node: ^10.12.0 || >=12.0.0} @@ -6927,15 +6826,6 @@ packages: acorn-jsx: 5.3.2(acorn@7.4.1) eslint-visitor-keys: 1.3.0 - /espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 - dev: false - /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -6979,7 +6869,7 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 require-like: 0.1.2 dev: false @@ -7692,10 +7582,6 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: false - /graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: false - /gray-matter@4.0.3: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} @@ -8708,7 +8594,7 @@ packages: '@jest/expect': 29.6.1 '@jest/test-result': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -8728,7 +8614,7 @@ packages: - supports-color dev: true - /jest-cli@29.6.1(@types/node@20.4.5): + /jest-cli@29.6.1(@types/node@18.17.1): resolution: {integrity: sha512-607dSgTA4ODIN6go9w6xY3EYkyPFGicx51a69H7yfvt7lN53xNswEVLovq+E77VsTRi5fWprLH0yl4DJgE8Ing==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -8745,7 +8631,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.1(@types/node@20.4.5) + jest-config: 29.6.1(@types/node@18.17.1) jest-util: 29.6.1 jest-validate: 29.6.1 prompts: 2.4.2 @@ -8756,6 +8642,45 @@ packages: - ts-node dev: true + /jest-config@29.6.1(@types/node@18.17.1): + resolution: {integrity: sha512-XdjYV2fy2xYixUiV2Wc54t3Z4oxYPAELUzWnV6+mcbq0rh742X2p52pii5A3oeRzYjLnQxCsZmp0qpI6klE2cQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.22.9 + '@jest/test-sequencer': 29.6.1 + '@jest/types': 29.6.1 + '@types/node': 18.17.1 + babel-jest: 29.6.1(@babel/core@7.22.9) + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.6.1 + jest-environment-node: 29.6.1 + jest-get-type: 29.4.3 + jest-regex-util: 29.4.3 + jest-resolve: 29.6.1 + jest-runner: 29.6.1 + jest-util: 29.6.1 + jest-validate: 29.6.1 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.6.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + /jest-config@29.6.1(@types/node@20.4.5): resolution: {integrity: sha512-XdjYV2fy2xYixUiV2Wc54t3Z4oxYPAELUzWnV6+mcbq0rh742X2p52pii5A3oeRzYjLnQxCsZmp0qpI6klE2cQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8830,7 +8755,7 @@ packages: '@jest/environment': 29.6.1 '@jest/fake-timers': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 jest-mock: 29.6.1 jest-util: 29.6.1 dev: true @@ -8846,7 +8771,7 @@ packages: dependencies: '@jest/types': 29.6.1 '@types/graceful-fs': 4.1.6 - '@types/node': 20.4.5 + '@types/node': 18.17.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -8897,7 +8822,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 jest-util: 29.6.1 dev: true @@ -8952,7 +8877,7 @@ packages: '@jest/test-result': 29.6.1 '@jest/transform': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -8983,7 +8908,7 @@ packages: '@jest/test-result': 29.6.1 '@jest/transform': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -9060,7 +8985,7 @@ packages: dependencies: '@jest/test-result': 29.6.1 '@jest/types': 29.6.1 - '@types/node': 20.4.5 + '@types/node': 18.17.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -9072,7 +8997,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -9080,12 +9005,12 @@ packages: resolution: {integrity: sha512-U+Wrbca7S8ZAxAe9L6nb6g8kPdia5hj32Puu5iOqBCMTMWFHXuK6dOV2IFrpedbTV8fjMFLdWNttQTBL6u2MRA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.4.5 + '@types/node': 18.17.1 jest-util: 29.6.1 merge-stream: 2.0.0 supports-color: 8.1.1 - /jest@29.6.1(@types/node@20.4.5): + /jest@29.6.1(@types/node@18.17.1): resolution: {integrity: sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9098,7 +9023,7 @@ packages: '@jest/core': 29.6.1 '@jest/types': 29.6.1 import-local: 3.1.0 - jest-cli: 29.6.1(@types/node@20.4.5) + jest-cli: 29.6.1(@types/node@18.17.1) transitivePeerDependencies: - '@types/node' - supports-color @@ -12739,7 +12664,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-jest@29.1.1(@babel/core@7.22.9)(jest@29.6.1)(typescript@5.1.6): + /ts-jest@29.1.1(@babel/core@7.22.9)(jest@29.6.1)(typescript@4.9.5): resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -12763,17 +12688,17 @@ packages: '@babel/core': 7.22.9 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.6.1(@types/node@20.4.5) + jest: 29.6.1(@types/node@18.17.1) jest-util: 29.6.1 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.5.4 - typescript: 5.1.6 + typescript: 4.9.5 yargs-parser: 21.1.1 dev: true - /ts-node@10.9.1(@types/node@20.4.5)(typescript@5.1.6): + /ts-node@10.9.1(@types/node@18.17.1)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -12792,14 +12717,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.4.5 + '@types/node': 18.17.1 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -12819,7 +12744,7 @@ packages: /tslib@2.6.1: resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} - /tsup@7.1.0(typescript@5.1.6): + /tsup@7.1.0(typescript@4.9.5): resolution: {integrity: sha512-mazl/GRAk70j8S43/AbSYXGgvRP54oQeX8Un4iZxzATHt0roW0t6HYDVZIXMw0ZQIpvr1nFMniIVnN5186lW7w==} engines: {node: '>=16.14'} hasBin: true @@ -12849,20 +12774,20 @@ packages: source-map: 0.8.0-beta.0 sucrase: 3.34.0 tree-kill: 1.2.2 - typescript: 5.1.6 + typescript: 4.9.5 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsutils@3.21.0(typescript@5.1.6): + /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.6 + typescript: 4.9.5 dev: false /tty-browserify@0.0.1: @@ -13034,11 +12959,6 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} - engines: {node: '>=14.17'} - hasBin: true - /ua-parser-js@1.0.35: resolution: {integrity: sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==} dev: false