From d276dad677dfa6fa17567333fc2e44b42ba8a9a3 Mon Sep 17 00:00:00 2001 From: Willy Douhard Date: Tue, 22 Aug 2023 10:45:14 +0800 Subject: [PATCH] Feat/prompt playground (#302) * Rework prompt playground to support any LLM provider, templates, variables and formatted prompts. --------- Co-authored-by: Alim TUNC --- .husky/pre-commit | 2 +- README.md | 5 + cypress.config.ts | 2 +- cypress/e2e/ask_file/spec.cy.ts | 2 +- cypress/e2e/ask_multiple_files/spec.cy.ts | 2 +- cypress/e2e/ask_user/spec.cy.ts | 2 +- cypress/e2e/audio_element/spec.cy.ts | 16 +- cypress/e2e/auth_client_factory/spec.cy.ts | 2 +- cypress/e2e/author_rename/main.py | 13 +- cypress/e2e/author_rename/spec.cy.ts | 14 +- cypress/e2e/avatar/spec.cy.ts | 2 +- cypress/e2e/cot/main.py | 2 - cypress/e2e/cot/spec.cy.ts | 18 +- cypress/e2e/custom_route/spec.cy.ts | 2 +- cypress/e2e/db_client_factory/spec.cy.ts | 2 +- cypress/e2e/default_expand_cot/main.py | 1 - cypress/e2e/default_expand_cot/spec.cy.ts | 2 +- cypress/e2e/error_handling/spec.cy.ts | 2 +- cypress/e2e/file_element/spec.cy.ts | 10 +- cypress/e2e/global_elements/spec.cy.ts | 10 +- cypress/e2e/haystack_cb/spec.cy.ts | 2 +- cypress/e2e/headers/spec.cy.ts | 2 +- cypress/e2e/langchain_cb/spec.cy.ts | 17 +- cypress/e2e/llama_index_cb/spec.cy.ts | 12 +- cypress/e2e/local_db/spec.cy.ts | 2 +- cypress/e2e/message_history/spec.cy.ts | 2 +- cypress/e2e/on_chat_start/spec.cy.ts | 6 +- cypress/e2e/openai/.chainlit/config.toml | 34 - cypress/e2e/openai/main_async.py | 42 - cypress/e2e/openai/main_sync.py | 43 - cypress/e2e/openai/spec.cy.ts | 16 - .../prompt_playground/.chainlit/config.toml | 63 + cypress/e2e/prompt_playground/main.py | 69 + cypress/e2e/prompt_playground/provider.py | 75 + cypress/e2e/prompt_playground/spec.cy.ts | 152 ++ cypress/e2e/pyplot/spec.cy.ts | 2 +- cypress/e2e/remove_elements/spec.cy.ts | 2 +- cypress/e2e/remove_message/spec.cy.ts | 2 +- cypress/e2e/scoped_elements/spec.cy.ts | 2 +- cypress/e2e/sdk_availability/spec.cy.ts | 2 +- cypress/e2e/stop_task/spec.cy.ts | 8 +- cypress/e2e/streaming/spec.cy.ts | 2 +- cypress/e2e/update_message/spec.cy.ts | 2 +- cypress/e2e/user_env/spec.cy.ts | 2 +- cypress/e2e/user_session/spec.cy.ts | 2 +- cypress/e2e/video_element/spec.cy.ts | 16 +- cypress/support/testUtils.ts | 4 +- package.json | 1 - pnpm-lock.yaml | 170 +- src/chainlit/__init__.py | 2 - src/chainlit/cli/__init__.py | 5 +- src/chainlit/cli/mock.py | 1613 ----------------- src/chainlit/client/base.py | 4 +- src/chainlit/client/cloud.py | 9 +- src/chainlit/client/local.py | 12 +- src/chainlit/db/prisma/schema.prisma | 4 +- src/chainlit/frontend/.eslintignore | 2 + src/chainlit/frontend/.eslintrc | 24 + src/chainlit/frontend/package.json | 1 + src/chainlit/frontend/pnpm-lock.yaml | 1283 ++++++------- src/chainlit/frontend/src/App.tsx | 1 + src/chainlit/frontend/src/api/index.ts | 87 +- .../src/components/atoms/ClipboardCopy.tsx | 56 + .../frontend/src/components/atoms/Code.tsx | 41 +- .../components/atoms/buttons/accentButton.tsx | 5 +- .../src/components/atoms/element/sideView.tsx | 3 +- .../src/components/atoms/element/video.tsx | 4 +- .../src/components/atoms/errorBoundary.tsx | 14 +- .../components/atoms/notificationCount.tsx | 71 +- .../frontend/src/components/atoms/toggle.tsx | 83 + .../src/components/molecules/inputLabel.tsx | 12 +- .../src/components/organisms/FormInput.tsx | 20 +- .../src/components/organisms/chat/index.tsx | 17 +- .../organisms/chat/inputBox/input.tsx | 2 +- .../organisms/chat/message/buttons.tsx | 14 +- .../dataset/deleteConversationButton.tsx | 3 +- .../organisms/inputs/inputStateHandler.tsx | 14 +- .../organisms/inputs/selectInput.tsx | 84 +- .../components/organisms/inputs/tagsInput.tsx | 1 + .../organisms/playground/actionBar.tsx | 20 + .../components/organisms/playground/basic.tsx | 104 ++ .../components/organisms/playground/chat.tsx | 108 ++ .../playground/editor/completion.tsx | 116 ++ .../organisms/playground/editor/formatted.tsx | 397 ++++ .../playground/editor/promptMessage.tsx | 170 ++ .../playground/editor/template/index.tsx | 105 ++ .../playground/editor/template/variable.tsx | 69 + .../playground/editor/variableModal.tsx | 121 ++ .../organisms/playground/editor/wrapper.tsx | 70 + .../organisms/playground/header.tsx | 58 + .../organisms/playground/helpers.tsx | 38 + .../components/organisms/playground/index.tsx | 279 +-- .../organisms/playground/modeToggle.tsx | 33 + .../organisms/playground/modelSettings.tsx | 334 ++-- .../organisms/playground/saveButton.tsx | 23 + .../organisms/playground/submitButton.tsx | 89 + .../organisms/playground/variableInput.tsx | 29 + .../src/components/organisms/slider.tsx | 29 +- src/chainlit/frontend/src/helpers/color.ts | 19 +- src/chainlit/frontend/src/helpers/format.ts | 90 + .../frontend/src/hooks/localChatHistory.ts | 44 + .../frontend/src/pages/Conversation.tsx | 4 +- src/chainlit/frontend/src/pages/Design.tsx | 14 +- src/chainlit/frontend/src/state/chat.ts | 41 +- src/chainlit/frontend/src/state/playground.ts | 46 +- src/chainlit/frontend/src/theme.ts | 10 +- src/chainlit/frontend/src/types/Input.ts | 5 +- src/chainlit/langchain/callbacks.py | 224 ++- src/chainlit/llama_index/callbacks.py | 29 +- src/chainlit/message.py | 29 +- src/chainlit/playground/__init__.py | 2 + src/chainlit/playground/config.py | 35 + src/chainlit/playground/provider.py | 123 ++ src/chainlit/playground/providers/__init__.py | 3 + .../playground/providers/anthropic.py | 115 ++ .../playground/providers/huggingface.py | 74 + src/chainlit/playground/providers/openai.py | 254 +++ src/chainlit/prompt.py | 32 + src/chainlit/server.py | 47 +- src/chainlit/types.py | 25 +- src/pyproject.toml | 6 +- 121 files changed, 4656 insertions(+), 3163 deletions(-) delete mode 100644 cypress/e2e/openai/.chainlit/config.toml delete mode 100644 cypress/e2e/openai/main_async.py delete mode 100644 cypress/e2e/openai/main_sync.py delete mode 100644 cypress/e2e/openai/spec.cy.ts create mode 100644 cypress/e2e/prompt_playground/.chainlit/config.toml create mode 100644 cypress/e2e/prompt_playground/main.py create mode 100644 cypress/e2e/prompt_playground/provider.py create mode 100644 cypress/e2e/prompt_playground/spec.cy.ts delete mode 100644 src/chainlit/cli/mock.py create mode 100644 src/chainlit/frontend/.eslintignore create mode 100644 src/chainlit/frontend/.eslintrc create mode 100644 src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx create mode 100644 src/chainlit/frontend/src/components/atoms/toggle.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/basic.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/chat.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/editor/wrapper.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/header.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/helpers.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx create mode 100644 src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx create mode 100644 src/chainlit/frontend/src/helpers/format.ts create mode 100644 src/chainlit/frontend/src/hooks/localChatHistory.ts create mode 100644 src/chainlit/playground/__init__.py create mode 100644 src/chainlit/playground/config.py create mode 100644 src/chainlit/playground/provider.py create mode 100644 src/chainlit/playground/providers/__init__.py create mode 100644 src/chainlit/playground/providers/anthropic.py create mode 100644 src/chainlit/playground/providers/huggingface.py create mode 100644 src/chainlit/playground/providers/openai.py create mode 100644 src/chainlit/prompt.py diff --git a/.husky/pre-commit b/.husky/pre-commit index b2000b1a1e..18faa0f3b2 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" pnpm lint-staged -pnpm run lintPython \ No newline at end of file +pnpm run lintPython diff --git a/README.md b/README.md index e88d808fc5..ec410f6562 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Please see [here](https://docs.chainlit.io) for full documentation on: ### 🐍 Pure Python Create a new file `demo.py` with the following code: + ```python import chainlit as cl @@ -48,6 +49,7 @@ async def main(message: str): ``` Now run it! + ``` $ chainlit run demo.py -w ``` @@ -59,9 +61,11 @@ $ chainlit run demo.py -w Check out our plug-and-play [integration](https://docs.chainlit.io/integrations/langchain) with LangChain! ### 📚 More Examples - Cookbook + You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more. ## 🛣 Roadmap + - [ ] New UI elements (spreadsheet, video, carousel...) - [ ] Create your own UI elements via component framework - [ ] DAG-based chain-of-thought interface @@ -77,4 +81,5 @@ As an open-source initiative in a rapidly evolving domain, we welcome contributi For detailed information on how to contribute, see [here](.github/CONTRIBUTING.md). ## License + Chainlit is open-source and licensed under the [Apache 2.0](LICENSE) license. diff --git a/cypress.config.ts b/cypress.config.ts index 7aea44fb2a..43a41e16a1 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ log(message) { console.log(message); return null; - } + }, }); }, }, diff --git a/cypress/e2e/ask_file/spec.cy.ts b/cypress/e2e/ask_file/spec.cy.ts index def815cc1f..51556b981d 100644 --- a/cypress/e2e/ask_file/spec.cy.ts +++ b/cypress/e2e/ask_file/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Upload file", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to receive and decode files", () => { diff --git a/cypress/e2e/ask_multiple_files/spec.cy.ts b/cypress/e2e/ask_multiple_files/spec.cy.ts index 08630f12b6..aa926b456b 100644 --- a/cypress/e2e/ask_multiple_files/spec.cy.ts +++ b/cypress/e2e/ask_multiple_files/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Upload multiple files", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to receive two files", () => { diff --git a/cypress/e2e/ask_user/spec.cy.ts b/cypress/e2e/ask_user/spec.cy.ts index 351c9361be..101f6c92b0 100644 --- a/cypress/e2e/ask_user/spec.cy.ts +++ b/cypress/e2e/ask_user/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; describe("Ask User", () => { before(() => { - runTestServer() + runTestServer(); }); it("should send a new message containing the user input", () => { diff --git a/cypress/e2e/audio_element/spec.cy.ts b/cypress/e2e/audio_element/spec.cy.ts index e6f97cd640..158f5e0bde 100644 --- a/cypress/e2e/audio_element/spec.cy.ts +++ b/cypress/e2e/audio_element/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("audio", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display an audio element", () => { @@ -11,11 +11,13 @@ describe("audio", () => { cy.get(".message").should("have.length", 1); cy.get(".message").eq(0).find(".inline-audio").should("have.length", 1); - cy.get(".inline-audio audio").then(($el) => { - const audioElement = $el.get(0) as HTMLAudioElement; - return audioElement.play().then(() => { - return audioElement.duration; - }); - }).should("be.greaterThan", 0); + cy.get(".inline-audio audio") + .then(($el) => { + const audioElement = $el.get(0) as HTMLAudioElement; + return audioElement.play().then(() => { + return audioElement.duration; + }); + }) + .should("be.greaterThan", 0); }); }); diff --git a/cypress/e2e/auth_client_factory/spec.cy.ts b/cypress/e2e/auth_client_factory/spec.cy.ts index ebc8e4d84d..d9ca0b1570 100644 --- a/cypress/e2e/auth_client_factory/spec.cy.ts +++ b/cypress/e2e/auth_client_factory/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Auth Custom client", () => { before(() => { - runTestServer() + runTestServer(); }); it("should call the custom client", () => { diff --git a/cypress/e2e/author_rename/main.py b/cypress/e2e/author_rename/main.py index e8ae325ec0..6581d38c3c 100644 --- a/cypress/e2e/author_rename/main.py +++ b/cypress/e2e/author_rename/main.py @@ -1,5 +1,3 @@ -from langchain import LLMMathChain, OpenAI - import chainlit as cl @@ -9,10 +7,7 @@ def rename(orig_author: str): return rename_dict.get(orig_author, orig_author) -@cl.on_message -async def main(message: str): - llm = OpenAI(temperature=0) - llm_math = LLMMathChain.from_llm(llm=llm) - res = await llm_math.acall(message, callbacks=[cl.AsyncLangchainCallbackHandler()]) - - await cl.Message(content="Hello").send() +@cl.on_chat_start +async def main(): + await cl.Message(author="LLMMathChain", content="2+2=4").send() + await cl.Message(content="The response is 4").send() diff --git a/cypress/e2e/author_rename/spec.cy.ts b/cypress/e2e/author_rename/spec.cy.ts index 1ea0e4cd32..ccf77cafcb 100644 --- a/cypress/e2e/author_rename/spec.cy.ts +++ b/cypress/e2e/author_rename/spec.cy.ts @@ -1,18 +1,12 @@ -import { runTestServer, submitMessage } from "../../support/testUtils"; +import { runTestServer } from "../../support/testUtils"; describe("Author rename", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to rename authors", () => { - cy.get("#welcome-screen").should("exist"); - submitMessage("What is 2+2?"); - cy.get("#albert-einstein-done").should("exist"); - cy.get("#albert-einstein-done").click(); - cy.get(".message").eq(1).should("contain", "Albert Einstein"); - cy.get(".message").should("have.length", 4); - - cy.get(".message").eq(3).should("contain", "Assistant"); + cy.get(".message").eq(0).should("contain", "Albert Einstein"); + cy.get(".message").eq(1).should("contain", "Assistant"); }); }); diff --git a/cypress/e2e/avatar/spec.cy.ts b/cypress/e2e/avatar/spec.cy.ts index 3b325afe46..31498685eb 100644 --- a/cypress/e2e/avatar/spec.cy.ts +++ b/cypress/e2e/avatar/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Avatar", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display a nested CoT", () => { diff --git a/cypress/e2e/cot/main.py b/cypress/e2e/cot/main.py index 9481a9cb19..279e69eae2 100644 --- a/cypress/e2e/cot/main.py +++ b/cypress/e2e/cot/main.py @@ -9,7 +9,6 @@ async def main(message: str, message_id: str): await cl.sleep(1) tool1_msg.content = "I need to use tool 2" - tool1_msg.prompt = "Tool 1 prompt" await tool1_msg.update() @@ -20,7 +19,6 @@ async def main(message: str, message_id: str): await cl.sleep(1) tool2_msg.content = "Response from tool 2" - tool2_msg.prompt = "Tool 2 prompt" await tool2_msg.update() diff --git a/cypress/e2e/cot/spec.cy.ts b/cypress/e2e/cot/spec.cy.ts index ffb0e39a69..45d462d511 100644 --- a/cypress/e2e/cot/spec.cy.ts +++ b/cypress/e2e/cot/spec.cy.ts @@ -1,20 +1,8 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; -function testPlayground(index, shouldContain: string) { - cy.get(".playground-button").eq(index).should("exist").click(); - - cy.get("#playground") - .should("exist") - .get("[contenteditable=true]") - .should("exist") - .should("contain", shouldContain); - - cy.get("#playground").get("#close-playground").should("exist").click(); -} - describe("Chain of Thought", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display a nested CoT", () => { @@ -30,10 +18,6 @@ describe("Chain of Thought", () => { cy.get("#tool-1-done").should("exist"); cy.get("#tool-2-done").should("exist"); - testPlayground(0, "Tool 1 prompt"); - cy.wait(1000); - testPlayground(1, "Tool 2 prompt"); - cy.get(".message").should("have.length", 5); }); }); diff --git a/cypress/e2e/custom_route/spec.cy.ts b/cypress/e2e/custom_route/spec.cy.ts index cb644ca09f..536e412791 100644 --- a/cypress/e2e/custom_route/spec.cy.ts +++ b/cypress/e2e/custom_route/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Custom Route", () => { before(() => { - runTestServer() + runTestServer(); cy.visit("hello"); }); diff --git a/cypress/e2e/db_client_factory/spec.cy.ts b/cypress/e2e/db_client_factory/spec.cy.ts index 9728b9b0f6..57b8ca0d52 100644 --- a/cypress/e2e/db_client_factory/spec.cy.ts +++ b/cypress/e2e/db_client_factory/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Db Custom client", () => { before(() => { - runTestServer() + runTestServer(); }); it("should call the custom client", () => { diff --git a/cypress/e2e/default_expand_cot/main.py b/cypress/e2e/default_expand_cot/main.py index 4ab034d817..1b583bfd12 100644 --- a/cypress/e2e/default_expand_cot/main.py +++ b/cypress/e2e/default_expand_cot/main.py @@ -7,7 +7,6 @@ async def main(): content="I need to use tool 2", author="Tool 1", indent=1, - prompt="Tool 1 prompt", ).send() await cl.Message( diff --git a/cypress/e2e/default_expand_cot/spec.cy.ts b/cypress/e2e/default_expand_cot/spec.cy.ts index 6a791fc67c..816aa5454b 100644 --- a/cypress/e2e/default_expand_cot/spec.cy.ts +++ b/cypress/e2e/default_expand_cot/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; describe("Default Expand", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to set the default_expand_messages field in the config to have the CoT expanded by default", () => { diff --git a/cypress/e2e/error_handling/spec.cy.ts b/cypress/e2e/error_handling/spec.cy.ts index bf793b8d9c..2deddc41ca 100644 --- a/cypress/e2e/error_handling/spec.cy.ts +++ b/cypress/e2e/error_handling/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Error Handling", () => { before(() => { - runTestServer() + runTestServer(); }); it("should correctly display errors", () => { diff --git a/cypress/e2e/file_element/spec.cy.ts b/cypress/e2e/file_element/spec.cy.ts index 27e988d758..5f32bcb01b 100644 --- a/cypress/e2e/file_element/spec.cy.ts +++ b/cypress/e2e/file_element/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("file", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display a file element", () => { @@ -11,9 +11,13 @@ describe("file", () => { cy.get(".message").should("have.length", 1); cy.get(".message").eq(0).find(".inline-file").should("have.length", 4); - cy.get("a.inline-file").eq(0).should("have.attr", "download", "example.mp4"); + cy.get("a.inline-file") + .eq(0) + .should("have.attr", "download", "example.mp4"); cy.get("a.inline-file").eq(1).should("have.attr", "download", "cat.jpeg"); cy.get("a.inline-file").eq(2).should("have.attr", "download", "hello.py"); - cy.get("a.inline-file").eq(3).should("have.attr", "download", "example.mp3"); + cy.get("a.inline-file") + .eq(3) + .should("have.attr", "download", "example.mp3"); }); }); diff --git a/cypress/e2e/global_elements/spec.cy.ts b/cypress/e2e/global_elements/spec.cy.ts index e85bdd17d7..462a9b92a0 100644 --- a/cypress/e2e/global_elements/spec.cy.ts +++ b/cypress/e2e/global_elements/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Global Elements", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display inlined, side and page elements", () => { @@ -14,12 +14,12 @@ describe("Global Elements", () => { // Inlined cy.get(".message").eq(0).find(".inline-image").should("have.length", 1); cy.get(".message").eq(0).find(".element-link").should("have.length", 2); - cy.get(".message").eq(0).find(".element-link") + cy.get(".message") .eq(0) - .should("contain", "text1"); - cy.get(".message").eq(0).find(".element-link") + .find(".element-link") .eq(0) - .click(); + .should("contain", "text1"); + cy.get(".message").eq(0).find(".element-link").eq(0).click(); // Side const sideViewTitle = cy.get("#side-view-title"); diff --git a/cypress/e2e/haystack_cb/spec.cy.ts b/cypress/e2e/haystack_cb/spec.cy.ts index f13eb5ee72..84855d2ca3 100644 --- a/cypress/e2e/haystack_cb/spec.cy.ts +++ b/cypress/e2e/haystack_cb/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Haystack Callback", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to send messages to the UI with prompts and elements", () => { diff --git a/cypress/e2e/headers/spec.cy.ts b/cypress/e2e/headers/spec.cy.ts index 645eb081ac..45212379d5 100644 --- a/cypress/e2e/headers/spec.cy.ts +++ b/cypress/e2e/headers/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Initial headers", () => { before(() => { - runTestServer() + runTestServer(); cy.visit("/", { headers: { "test-header": "test header value" }, }); diff --git a/cypress/e2e/langchain_cb/spec.cy.ts b/cypress/e2e/langchain_cb/spec.cy.ts index ccc22c123f..26dd113cbd 100644 --- a/cypress/e2e/langchain_cb/spec.cy.ts +++ b/cypress/e2e/langchain_cb/spec.cy.ts @@ -2,10 +2,10 @@ import { describeSyncAsync, runTestServer } from "../../support/testUtils"; describeSyncAsync("Langchain Callback", (mode) => { before(() => { - runTestServer(mode) + runTestServer(mode); }); - it("it should be able to send messages to the UI with prompts", () => { + it("should be able to send messages to the UI with prompts", () => { cy.get("#welcome-screen").should("exist"); cy.get(".message").should("have.length", 1); @@ -20,15 +20,14 @@ describeSyncAsync("Langchain Callback", (mode) => { cy.get(".playground-button").eq(0).should("exist").click(); - cy.get("#playground") + cy.get(".formatted-editor [contenteditable]") .should("exist") - .get("[contenteditable=true]") + .should("contain", "This is prompt of llm1"); + + cy.get(".completion-editor [contenteditable]") .should("exist") - .should( - "contain", - "This is prompt of llm1\nThis is the response of tool1" - ); + .should("contain", "This is the response of llm1"); - cy.get("#playground").get("#close-playground").should("exist").click(); + cy.get("#close-playground").should("exist").click(); }); }); diff --git a/cypress/e2e/llama_index_cb/spec.cy.ts b/cypress/e2e/llama_index_cb/spec.cy.ts index c0887a1822..3a3c08cf4d 100644 --- a/cypress/e2e/llama_index_cb/spec.cy.ts +++ b/cypress/e2e/llama_index_cb/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Llama Index Callback", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to send messages to the UI with prompts and elements", () => { @@ -22,12 +22,14 @@ describe("Llama Index Callback", () => { cy.get(".playground-button").eq(0).should("exist").click(); - cy.get("#playground") + cy.get(".formatted-editor [contenteditable]") .should("exist") - .get("[contenteditable=true]") + .should("contain", "This is the LLM prompt"); + + cy.get(".completion-editor [contenteditable]") .should("exist") - .should("contain", "This is the LLM prompt\nThis is the LLM response"); + .should("contain", "This is the LLM response"); - cy.get("#playground").get("#close-playground").should("exist").click(); + cy.get("#close-playground").should("exist").click(); }); }); diff --git a/cypress/e2e/local_db/spec.cy.ts b/cypress/e2e/local_db/spec.cy.ts index f86bf35a1a..299fe060ca 100644 --- a/cypress/e2e/local_db/spec.cy.ts +++ b/cypress/e2e/local_db/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; describe("Local db", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to see and interact with a stored conversation", () => { diff --git a/cypress/e2e/message_history/spec.cy.ts b/cypress/e2e/message_history/spec.cy.ts index 1cc2cd7675..6bf433fb3a 100644 --- a/cypress/e2e/message_history/spec.cy.ts +++ b/cypress/e2e/message_history/spec.cy.ts @@ -7,7 +7,7 @@ import { describe("Message History", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to show the last message in the message history", () => { diff --git a/cypress/e2e/on_chat_start/spec.cy.ts b/cypress/e2e/on_chat_start/spec.cy.ts index 5a6cb74560..b258e3d65e 100644 --- a/cypress/e2e/on_chat_start/spec.cy.ts +++ b/cypress/e2e/on_chat_start/spec.cy.ts @@ -1,8 +1,8 @@ -import { runTestServer, submitMessage } from "../../support/testUtils"; +import { runTestServer } from "../../support/testUtils"; describe("on_chat_start", () => { before(() => { - runTestServer() + runTestServer(); }); it("should correctly run on_chat_start", () => { @@ -10,6 +10,6 @@ describe("on_chat_start", () => { messages.should("have.length", 1); messages.eq(0).should("contain.text", "Hello!"); - messages.eq(0).should("contain.html", "
{ - before(() => { - runTestServer(mode) - }); - - it("should output an SQL query", () => { - cy.get("#welcome-screen").should("exist"); - submitMessage("How many minutes of video were watched"); - const messages = cy.get(".message"); - messages.should("have.length", 2); - - messages.eq(1).should("not.be.empty"); - }); -}); diff --git a/cypress/e2e/prompt_playground/.chainlit/config.toml b/cypress/e2e/prompt_playground/.chainlit/config.toml new file mode 100644 index 0000000000..6aade16d8b --- /dev/null +++ b/cypress/e2e/prompt_playground/.chainlit/config.toml @@ -0,0 +1,63 @@ +[project] +# If true (default), the app will be available to anonymous users. +# If false, users will need to authenticate and be part of the project to use the app. +public = true + +# The project ID (found on https://cloud.chainlit.io). +# The project ID is required when public is set to false or when using the cloud database. +#id = "" + +# Uncomment if you want to persist the chats. +# local will create a database in your .chainlit directory (requires node.js installed). +# cloud will use the Chainlit cloud database. +# custom will load use your custom client. +# database = "local" + +# Whether to enable telemetry (default: true). No personal data is collected. +enable_telemetry = true + +# List of environment variables to be provided by each user to use the app. +user_env = [] + +# Duration (in seconds) during which the session is saved when the connection is lost +session_timeout = 3600 + +[UI] +# Name of the app and chatbot. +name = "Chatbot" + +# Description of the app and chatbot. This is used for HTML tags. +# description = "" + +# The default value for the expand messages settings. +default_expand_messages = false + +# Hide the chain of thought details from the user in the UI. +hide_cot = false + +# Link to your github repo. This will add a github button in the UI's header. +# github = "" + +# Override default MUI light theme. (Check theme.ts) +[UI.theme.light] + #background = "#FAFAFA" + #paper = "#FFFFFF" + + [UI.theme.light.primary] + #main = "#F80061" + #dark = "#980039" + #light = "#FFE7EB" + +# Override default MUI dark theme. (Check theme.ts) +[UI.theme.dark] + #background = "#FAFAFA" + #paper = "#FFFFFF" + + [UI.theme.dark.primary] + #main = "#F80061" + #dark = "#980039" + #light = "#FFE7EB" + + +[meta] +generated_by = "0.6.1" diff --git a/cypress/e2e/prompt_playground/main.py b/cypress/e2e/prompt_playground/main.py new file mode 100644 index 0000000000..4b2a39f17b --- /dev/null +++ b/cypress/e2e/prompt_playground/main.py @@ -0,0 +1,69 @@ +from provider import ChatTestLLM, TestLLM + +import chainlit as cl +from chainlit.prompt import Prompt, PromptMessage + +template = """Hello, this is a template. +This is a simple variable {variable1} +This is a another simple {variable2} +Those are two simple variables {variable1} + {variable2} +This is a formatting test {{variable1}} {{{variable2}}} {variable3} +This is another formatting test {{{{variable1}}}} {{{{{variable1}}}}} +This is a curly braces formatting test {{ {{{{ }} }}}} +""" + +formatted = "This is a test formatted prompt" + +inputs = { + "variable1": "variable1 value", + "variable2": "variable2 value", + "variable3": "{{variable3 value}}", +} + +completion = "This is the original completion" + + +@cl.on_chat_start +async def start(): + await cl.Message( + content="This is a message with a basic prompt", + prompt=Prompt( + provider=TestLLM.id, + completion=completion, + template=template, + inputs=inputs, + ), + ).send() + + await cl.Message( + content="This is a message with only a formatted basic prompt", + prompt=Prompt(provider=TestLLM.id, completion=completion, formatted=formatted), + ).send() + + await cl.Message( + content="This is a message with a chat prompt", + prompt=Prompt( + provider=ChatTestLLM.id, + completion=completion, + template=template, + inputs=inputs, + messages=[ + PromptMessage(template=template, role="system"), + PromptMessage(template=template, role="system"), + ], + ), + ).send() + + await cl.Message( + content="This is a message with only a formatted chat prompt", + prompt=Prompt( + provider=ChatTestLLM.id, + completion=completion, + template=template, + inputs=inputs, + messages=[ + PromptMessage(formatted=formatted, role="system"), + PromptMessage(formatted=formatted, role="system"), + ], + ), + ).send() diff --git a/cypress/e2e/prompt_playground/provider.py b/cypress/e2e/prompt_playground/provider.py new file mode 100644 index 0000000000..e13956a08f --- /dev/null +++ b/cypress/e2e/prompt_playground/provider.py @@ -0,0 +1,75 @@ +import os + +from fastapi.responses import StreamingResponse + +import chainlit as cl +from chainlit.input_widget import Select, Slider +from chainlit.playground.config import BaseProvider, add_llm_provider + +os.environ["TEST_LLM_API_KEY"] = "sk..." + +class TestLLMProvider(BaseProvider): + async def create_completion(self, request): + await super().create_completion(request) + + self.create_prompt(request) + self.require_settings(request.prompt.settings) + + stream = ["This ", "is ", "the ", "test ", "completion"] + + async def create_event_stream(): + for token in stream: + await cl.sleep(0.1) + yield token + + return StreamingResponse(create_event_stream()) + + +TestLLM = TestLLMProvider( + id="test", + name="Test", + env_vars={"api_key": "TEST_LLM_API_KEY"}, + inputs=[ + Select( + id="model", + label="Model", + values=["test-model-1", "test-model-2"], + initial_value="test-model-2", + ), + Slider( + id="temperature", + label="Temperature", + min=0.0, + max=1.0, + step=0.01, + initial=1, + ), + ], + is_chat=False, +) + +ChatTestLLM = TestLLMProvider( + id="test-chat", + name="TestChat", + env_vars={"api_key": "TEST_LLM_API_KEY"}, + inputs=[ + Select( + id="model", + label="Model", + values=["test-model-chat-1", "test-model-chat-2"], + initial_value="test-model-chat-2", + ), + Slider( + id="temperature", + label="Temperature", + min=0.0, + max=1.0, + step=0.01, + initial=1, + ), + ], + is_chat=True, +) + +add_llm_provider(TestLLM) +add_llm_provider(ChatTestLLM) diff --git a/cypress/e2e/prompt_playground/spec.cy.ts b/cypress/e2e/prompt_playground/spec.cy.ts new file mode 100644 index 0000000000..cec1f05b9c --- /dev/null +++ b/cypress/e2e/prompt_playground/spec.cy.ts @@ -0,0 +1,152 @@ +import { runTestServer } from "../../support/testUtils"; + +function openPlayground(index) { + cy.get(".playground-button").eq(index).should("exist").click(); +} +const expectedTemplate = + "Hello, this is a template.This is a simple variable {variable1}This is a another simple {variable2}Those are two simple variables {variable1} + {variable2}This is a formatting test {{variable1}} {{{variable2}}} {variable3}This is another formatting test {{{{variable1}}}} {{{{{variable1}}}}}This is a curly braces formatting test {{ {{{{ }} }}}}"; + +const expectedFormattedTemplate = + "Hello, this is a template.This is a simple variable variable1 valueThis is a another simple variable2 valueThose are two simple variables variable1 value + variable2 valueThis is a formatting test {variable1} {variable2 value} {{variable3 value}}This is another formatting test {{variable1}} {{variable1 value}}This is a curly braces formatting test { {{ } }}"; +const variable1ExpectedContent = "variable1 value"; + +const expectedFormatted = `This is a test formatted prompt`; + +const expectedCompletion = "This is the test completion"; + +function testTemplate(chat?: boolean) { + it("should display the template and highlight the variables", () => { + cy.get(".tab-Template").should("exist").click(); + + cy.get(".template-editor [contenteditable]") + .should("exist") + .should("contain", expectedTemplate); + + const expectedCount = chat ? 6 : 3; + + cy.get(".input-variable1").should("have.length", expectedCount); + + cy.get(".input-variable2").should("have.length", expectedCount); + }); + + it("should let the user click a variable to edit its value", () => { + cy.get(".input-variable1").eq(0).click(); + + cy.get("#variable-modal [contenteditable]") + .should("exist") + .should("contain", variable1ExpectedContent); + + cy.get("#edit-variable").should("exist").click(); + }); + + it("should display the formatted template", () => { + cy.get(".tab-Formatted").should("exist").click(); + cy.get(".formatted-editor [contenteditable]") + .should("exist") + .should("contain", expectedFormattedTemplate); + }); + + it("should prevent the user to update the formatted template", () => { + cy.get(".tab-Formatted").should("exist").click(); + cy.get(".formatted-editor [contenteditable]").eq(0).type("foobar"); + + cy.get(".tab-Formatted").click(); + + cy.get(".formatted-editor [contenteditable]") + .eq(0) + .should("contain", expectedFormattedTemplate); + }); +} + +function testFormatted() { + it("should display the missing template warning", () => { + cy.get("#template-warning").should("exist"); + }); + + it("should display the formatted prompt", () => { + cy.get(".formatted-editor [contenteditable]") + .should("exist") + .should("contain", expectedFormatted); + }); + + it("should let the user update the formatted prompt", () => { + cy.get(".formatted-editor [contenteditable]") + .eq(0) + .type("foobar") + .should("contain", "foobar" + expectedFormatted); + }); +} + +function testCompletion() { + it("should be able to call the LLM provider and stream the completion", () => { + cy.get("#submit-prompt").should("exist").click(); + cy.get(".completion-editor [contenteditable]").should( + "contain", + expectedCompletion + ); + }); +} + +function testSettings(chat?: boolean) { + it("should be able to switch providers and preserve settings", () => { + const initialModel = chat ? "test-model-chat-2" : "test-model-2"; + const nextModel = chat ? "test-model-2" : "test-model-chat-2"; + + const optionTarget = chat ? "[data-value=test]" : "[data-value=test-chat]"; + + cy.get("#model").invoke("val").should("equal", initialModel); + cy.get("#temperature").invoke("val").should("equal", "1"); + cy.get("#llm-providers").parent().click(); + cy.get(optionTarget).click(); + cy.get("#model").invoke("val").should("equal", nextModel); + cy.get("#temperature").invoke("val").should("equal", "1"); + }); +} + +describe("PromptPlayground", () => { + before(() => { + runTestServer(); + }); + + describe("Basic template", () => { + beforeEach(() => { + cy.visit("/"); + openPlayground(0); + }); + testTemplate(false); + testCompletion(); + testSettings(false); + }); + + describe("Basic formatted", () => { + beforeEach(() => { + cy.visit("/"); + openPlayground(1); + }); + + testFormatted(); + testCompletion(); + testSettings(false); + }); + + describe("Chat template", () => { + beforeEach(() => { + cy.visit("/"); + openPlayground(2); + }); + testTemplate(true); + testCompletion(); + testSettings(true); + }); + + describe("Chat formatted", () => { + beforeEach(() => { + cy.visit("/"); + openPlayground(3); + }); + + testFormatted(); + testCompletion(); + testSettings(true); + }); +}); diff --git a/cypress/e2e/pyplot/spec.cy.ts b/cypress/e2e/pyplot/spec.cy.ts index 5c22585d11..e13d46d6a6 100644 --- a/cypress/e2e/pyplot/spec.cy.ts +++ b/cypress/e2e/pyplot/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("pyplot", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display an inline chart", () => { diff --git a/cypress/e2e/remove_elements/spec.cy.ts b/cypress/e2e/remove_elements/spec.cy.ts index 178729553c..92a79fc3a5 100644 --- a/cypress/e2e/remove_elements/spec.cy.ts +++ b/cypress/e2e/remove_elements/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("remove_elements", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to remove elements", () => { diff --git a/cypress/e2e/remove_message/spec.cy.ts b/cypress/e2e/remove_message/spec.cy.ts index 59f3df780c..085044ddfc 100644 --- a/cypress/e2e/remove_message/spec.cy.ts +++ b/cypress/e2e/remove_message/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; describe("Delete Message", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to delete a message", () => { diff --git a/cypress/e2e/scoped_elements/spec.cy.ts b/cypress/e2e/scoped_elements/spec.cy.ts index 26690aeef2..9e10affa14 100644 --- a/cypress/e2e/scoped_elements/spec.cy.ts +++ b/cypress/e2e/scoped_elements/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Scoped Elements", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display inlined, side and page elements", () => { diff --git a/cypress/e2e/sdk_availability/spec.cy.ts b/cypress/e2e/sdk_availability/spec.cy.ts index 190f2324b0..393fc5318a 100644 --- a/cypress/e2e/sdk_availability/spec.cy.ts +++ b/cypress/e2e/sdk_availability/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Emitter should be reachable from all contexts", () => { before(() => { - runTestServer() + runTestServer(); }); it("should find the Emitter from async, make_async and async_from_sync contexts", () => { diff --git a/cypress/e2e/stop_task/spec.cy.ts b/cypress/e2e/stop_task/spec.cy.ts index ff9b80218e..51187096c4 100644 --- a/cypress/e2e/stop_task/spec.cy.ts +++ b/cypress/e2e/stop_task/spec.cy.ts @@ -1,8 +1,12 @@ -import { describeSyncAsync, runTestServer, submitMessage } from "../../support/testUtils"; +import { + describeSyncAsync, + runTestServer, + submitMessage, +} from "../../support/testUtils"; describeSyncAsync("Stop task", (mode) => { before(() => { - runTestServer(mode) + runTestServer(mode); }); it("should be able to stop a task", () => { diff --git a/cypress/e2e/streaming/spec.cy.ts b/cypress/e2e/streaming/spec.cy.ts index 12b99f7815..235d140e49 100644 --- a/cypress/e2e/streaming/spec.cy.ts +++ b/cypress/e2e/streaming/spec.cy.ts @@ -10,7 +10,7 @@ function testStreamedMessage(index: number) { describe("Streaming", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to stream a message", () => { diff --git a/cypress/e2e/update_message/spec.cy.ts b/cypress/e2e/update_message/spec.cy.ts index f1c83628f6..b0c0a57133 100644 --- a/cypress/e2e/update_message/spec.cy.ts +++ b/cypress/e2e/update_message/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("Update Message", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to update a message", () => { diff --git a/cypress/e2e/user_env/spec.cy.ts b/cypress/e2e/user_env/spec.cy.ts index a81507ab6c..833814690e 100644 --- a/cypress/e2e/user_env/spec.cy.ts +++ b/cypress/e2e/user_env/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer, submitMessage } from "../../support/testUtils"; describe("User Env", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to ask a user for required keys", () => { diff --git a/cypress/e2e/user_session/spec.cy.ts b/cypress/e2e/user_session/spec.cy.ts index 33e5faebc8..1b6e460179 100644 --- a/cypress/e2e/user_session/spec.cy.ts +++ b/cypress/e2e/user_session/spec.cy.ts @@ -12,7 +12,7 @@ function newSession() { describe("User Session", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to store data related per user session", () => { diff --git a/cypress/e2e/video_element/spec.cy.ts b/cypress/e2e/video_element/spec.cy.ts index e1006854a4..13d4eb3d49 100644 --- a/cypress/e2e/video_element/spec.cy.ts +++ b/cypress/e2e/video_element/spec.cy.ts @@ -2,7 +2,7 @@ import { runTestServer } from "../../support/testUtils"; describe("video", () => { before(() => { - runTestServer() + runTestServer(); }); it("should be able to display a video element", () => { @@ -11,11 +11,13 @@ describe("video", () => { cy.get(".message").should("have.length", 1); cy.get(".message").eq(0).find(".inline-video").should("have.length", 1); - cy.get("video.inline-video").then(($el) => { - const videoElement = $el.get(0) as HTMLVideoElement; - return videoElement.play().then(() => { - return videoElement.duration; - }); - }).should("be.greaterThan", 0); + cy.get("video.inline-video") + .then(($el) => { + const videoElement = $el.get(0) as HTMLVideoElement; + return videoElement.play().then(() => { + return videoElement.duration; + }); + }) + .should("be.greaterThan", 0); }); }); diff --git a/cypress/support/testUtils.ts b/cypress/support/testUtils.ts index b6db2ada20..704a0894a2 100644 --- a/cypress/support/testUtils.ts +++ b/cypress/support/testUtils.ts @@ -2,13 +2,13 @@ import { sep } from "path"; import { ExecutionMode } from "./utils"; export function submitMessage(message: string) { - cy.wait(2000); + cy.wait(1000); cy.get(`#chat-input`).should("not.be.disabled"); cy.get(`#chat-input`).type(`${message}{enter}`); } export function openHistory() { - cy.wait(2000); + cy.wait(1000); cy.get(`#chat-input`).should("not.be.disabled"); cy.get(`#chat-input`).type(`{upArrow}`); } diff --git a/package.json b/package.json index 9be7f07ed5..b17c97fcf0 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "lint-staged": "^13.2.3", "prettier": "^2.8.8", "shell-exec": "^1.1.2", - "tree-kill": "^1.2.2", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21537323e6..a5e7eac6de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,12 +35,9 @@ devDependencies: shell-exec: specifier: ^1.1.2 version: 1.1.2 - tree-kill: - specifier: ^1.2.2 - version: 1.2.2 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@14.18.53)(typescript@5.0.4) + version: 10.9.1(@types/node@20.4.9)(typescript@5.0.4) typescript: specifier: ^5.0.4 version: 5.0.4 @@ -52,11 +49,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@babel/code-frame@7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.10 + chalk: 2.4.2 dev: true /@babel/generator@7.17.7: @@ -78,21 +76,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-string-parser@7.22.5: @@ -105,8 +103,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 @@ -114,8 +112,8 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.22.10: + resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: @@ -126,22 +124,22 @@ packages: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/code-frame': 7.22.10 + '@babel/parser': 7.22.10 + '@babel/types': 7.22.10 dev: true /@babel/traverse@7.17.3: resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 '@babel/generator': 7.17.7 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.7 + '@babel/parser': 7.22.10 '@babel/types': 7.17.0 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 @@ -157,8 +155,8 @@ packages: to-fast-properties: 2.0.0 dev: true - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + /@babel/types@7.22.10: + resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -180,8 +178,8 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@cypress/request@2.88.11: - resolution: {integrity: sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==} + /@cypress/request@2.88.12: + resolution: {integrity: sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==} engines: {node: '>= 6'} dependencies: aws-sign2: 0.7.0 @@ -199,7 +197,7 @@ packages: performance-now: 2.1.0 qs: 6.10.4 safe-buffer: 5.2.1 - tough-cookie: 2.5.0 + tough-cookie: 4.1.3 tunnel-agent: 0.6.0 uuid: 8.3.2 dev: true @@ -220,16 +218,16 @@ packages: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: eslint: 8.40.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + /@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: true - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} + /@eslint/eslintrc@2.1.1: + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -317,7 +315,7 @@ packages: optional: true dependencies: '@babel/generator': 7.17.7 - '@babel/parser': 7.22.7 + '@babel/parser': 7.22.10 '@babel/traverse': 7.17.3 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -347,8 +345,12 @@ packages: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true - /@types/node@14.18.53: - resolution: {integrity: sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A==} + /@types/node@14.18.54: + resolution: {integrity: sha512-uq7O52wvo2Lggsx1x21tKZgqkJpvwCseBBPtX/nKQfpVlEsLOb11zZ1CRsWUKvJF0+lzuA9jwvA7Pr2Wt7i3xw==} + dev: true + + /@types/node@20.4.9: + resolution: {integrity: sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ==} dev: true /@types/semver@7.5.0: @@ -367,7 +369,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.53 + '@types/node': 14.18.54 dev: true optional: true @@ -382,7 +384,7 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.5.1 + '@eslint-community/regexpp': 4.6.2 '@typescript-eslint/parser': 5.62.0(eslint@8.40.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 5.59.5 '@typescript-eslint/type-utils': 5.59.5(eslint@8.40.0)(typescript@5.0.4) @@ -532,7 +534,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.59.5 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /@typescript-eslint/visitor-keys@5.62.0: @@ -540,7 +542,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.62.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /acorn-jsx@5.3.2(acorn@8.10.0): @@ -721,8 +723,8 @@ packages: ieee754: 1.2.1 dev: true - /cachedir@2.3.0: - resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} + /cachedir@2.4.0: + resolution: {integrity: sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==} engines: {node: '>=6'} dev: true @@ -885,16 +887,16 @@ packages: hasBin: true requiresBuild: true dependencies: - '@cypress/request': 2.88.11 + '@cypress/request': 2.88.12 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/node': 14.18.53 + '@types/node': 14.18.54 '@types/sinonjs__fake-timers': 8.1.1 '@types/sizzle': 2.3.3 arch: 2.2.0 blob-util: 2.0.2 bluebird: 3.7.2 buffer: 5.7.1 - cachedir: 2.3.0 + cachedir: 2.4.0 chalk: 4.1.2 check-more-types: 2.24.0 cli-cursor: 3.1.0 @@ -903,7 +905,7 @@ packages: common-tags: 1.8.2 dayjs: 1.11.9 debug: 4.3.4(supports-color@8.1.1) - enquirer: 2.3.6 + enquirer: 2.4.1 eventemitter2: 6.4.7 execa: 4.1.0 executable: 4.1.1 @@ -914,7 +916,7 @@ packages: is-ci: 3.0.1 is-installed-globally: 0.4.0 lazy-ass: 1.6.0 - listr2: 3.14.0(enquirer@2.3.6) + listr2: 3.14.0(enquirer@2.4.1) lodash: 4.17.21 log-symbols: 4.1.0 minimist: 1.2.8 @@ -1023,11 +1025,12 @@ packages: once: 1.4.0 dev: true - /enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + /enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} dependencies: ansi-colors: 4.1.3 + strip-ansi: 6.0.1 dev: true /escape-string-regexp@1.0.5: @@ -1048,16 +1051,16 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope@7.2.1: - resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: true - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + /eslint-visitor-keys@3.4.2: + resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -1067,8 +1070,8 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.1 '@eslint/js': 8.40.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 @@ -1079,8 +1082,8 @@ packages: debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.1 - eslint-visitor-keys: 3.4.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -1095,7 +1098,7 @@ packages: imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.4.1 + js-sdsl: 4.4.2 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -1116,7 +1119,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /esquery@1.5.0: @@ -1216,8 +1219,8 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-glob@3.3.0: - resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -1406,7 +1409,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -1593,8 +1596,8 @@ packages: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} dev: true - /js-sdsl@4.4.1: - resolution: {integrity: sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==} + /js-sdsl@4.4.2: + resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} dev: true /js-tokens@4.0.0: @@ -1701,7 +1704,7 @@ packages: - supports-color dev: true - /listr2@3.14.0(enquirer@2.3.6): + /listr2@3.14.0(enquirer@2.4.1): resolution: {integrity: sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==} engines: {node: '>=10.0.0'} peerDependencies: @@ -1712,7 +1715,7 @@ packages: dependencies: cli-truncate: 2.1.0 colorette: 2.0.20 - enquirer: 2.3.6 + enquirer: 2.4.1 log-update: 4.0.0 p-map: 4.0.0 rfdc: 1.3.0 @@ -2032,6 +2035,10 @@ packages: side-channel: 1.0.4 dev: true + /querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + dev: true + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -2042,6 +2049,10 @@ packages: throttleit: 1.0.0 dev: true + /requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2080,7 +2091,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.1 dev: true /safe-buffer@5.2.1: @@ -2288,20 +2299,17 @@ packages: is-number: 7.0.0 dev: true - /tough-cookie@2.5.0: - resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} - engines: {node: '>=0.8'} + /tough-cookie@4.1.3: + resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} + engines: {node: '>=6'} dependencies: psl: 1.9.0 punycode: 2.3.0 + universalify: 0.2.0 + url-parse: 1.5.10 dev: true - /tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - dev: true - - /ts-node@10.9.1(@types/node@14.18.53)(typescript@5.0.4): + /ts-node@10.9.1(@types/node@20.4.9)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -2320,7 +2328,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 14.18.53 + '@types/node': 20.4.9 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -2336,8 +2344,8 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.6.0: - resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.1: + resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} dev: true /tsutils@3.21.0(typescript@5.0.4): @@ -2383,6 +2391,11 @@ packages: hasBin: true dev: true + /universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + dev: true + /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -2399,6 +2412,13 @@ packages: punycode: 2.3.0 dev: true + /url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + dev: true + /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true diff --git a/src/chainlit/__init__.py b/src/chainlit/__init__.py index d76202bd9d..ee9363773e 100644 --- a/src/chainlit/__init__.py +++ b/src/chainlit/__init__.py @@ -30,7 +30,6 @@ from chainlit.message import AskFileMessage, AskUserMessage, ErrorMessage, Message from chainlit.sync import make_async, run_sync from chainlit.telemetry import trace -from chainlit.types import LLMSettings from chainlit.user_session import user_session from chainlit.utils import make_module_getattr, wrap_user_function from chainlit.version import __version__ @@ -192,7 +191,6 @@ def sleep(duration: int): __all__ = [ "user_session", - "LLMSettings", "Action", "Audio", "Pdf", diff --git a/src/chainlit/cli/__init__.py b/src/chainlit/cli/__init__.py index 7781d1ef6d..581a054f48 100644 --- a/src/chainlit/cli/__init__.py +++ b/src/chainlit/cli/__init__.py @@ -138,9 +138,8 @@ def chainlit_run(target, watch, headless, debug, ci, no_cache, db, host, port): config.project.enable_telemetry = False no_cache = True - from chainlit.cli.mock import mock_openai - - mock_openai() + # This is required to have OpenAI LLM providers available for the CI run + os.environ["OPENAI_API_KEY"] = "sk-FAKE-OPENAI-API-KEY" else: trace_event("chainlit run") diff --git a/src/chainlit/cli/mock.py b/src/chainlit/cli/mock.py deleted file mode 100644 index d552ebd855..0000000000 --- a/src/chainlit/cli/mock.py +++ /dev/null @@ -1,1613 +0,0 @@ -def mock_openai(): - import os - - from aioresponses import aioresponses - from responses import RequestsMock - - # Mock the openai api key - os.environ["OPENAI_API_KEY"] = "sk-FAKE-OPENAI-API-KEY" - - mocked_completion = { - "id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7", - "object": "text_completion", - "created": 1589478378, - "model": "text-davinci-003", - "choices": [ - { - "text": "\n\n```text\n3*3\n```", - "index": 0, - "logprobs": None, - "finish_reason": "length", - } - ], - "usage": { - "prompt_tokens": 5, - "completion_tokens": 7, - "total_tokens": 12, - }, - } - - mocked_embedding = { - "data": [ - { - "embedding": [ - -0.00836049672216177, - -0.027484877035021782, - -0.01576237753033638, - -0.021418210119009018, - 0.004159706644713879, - 0.010264033451676369, - 0.023116327822208405, - -0.00405699759721756, - -0.00944921001791954, - -0.013235741294920444, - 0.016501881182193756, - 0.015885628759860992, - -0.010887132957577705, - 0.002076429780572653, - 0.0009842927101999521, - 0.0108186611905694, - 0.019240783527493477, - -0.01489962451159954, - 0.03883762285113335, - -0.01863822527229786, - -0.005395635962486267, - -0.013646576553583145, - 0.01301662903279066, - 0.0029631489887833595, - 0.0009517682483419776, - 0.004871821030974388, - 0.0302374716848135, - -0.02864890918135643, - 0.022773966193199158, - -0.019939202815294266, - -0.0161869078874588, - -0.025992175564169884, - -0.012386681511998177, - -0.00405699759721756, - -0.01488592941313982, - -0.024677501991391182, - -0.007908578030765057, - -0.016597742214798927, - 0.007422422990202904, - -0.015392626635730267, - 0.012756433337926865, - -0.0016296464018523693, - -0.006364522501826286, - -0.002435910515487194, - -0.02273288182914257, - 0.013708202168345451, - -0.02174687758088112, - -0.02633453719317913, - 0.013838299550116062, - 0.042316026985645294, - 0.04182302579283714, - 0.011332204565405846, - -0.006860948167741299, - -0.029689691960811615, - -0.020829346030950546, - -0.011818359605967999, - -0.011914221569895744, - 0.012455154210329056, - -0.014160120859742165, - -0.023896915838122368, - -0.010366742499172688, - 0.006059819366782904, - -0.0077716330997645855, - -0.004200790077447891, - -0.005200489424169064, - -0.017501579597592354, - -0.018980586901307106, - 0.003909782040864229, - -0.005405906587839127, - 0.00633713323622942, - 0.053846802562475204, - 0.03505793958902359, - 0.00721015827730298, - 0.0017700151074677706, - 0.029963582754135132, - -0.0026772762648761272, - -0.024855531752109528, - 0.0005807327106595039, - -0.018994281068444252, - -0.026676900684833527, - 0.009195861406624317, - -0.018419113010168076, - 0.005279232747852802, - -0.016611438244581223, - 0.010250338353216648, - 0.0046458616852760315, - 0.01153077557682991, - 0.02240421436727047, - -0.030840029940009117, - -0.018049361184239388, - -0.0042213317938148975, - 0.030620917677879333, - 0.005820165853947401, - 0.031935591250658035, - -0.02130865305662155, - 0.005159405525773764, - -0.01721399649977684, - 0.021075846627354622, - 0.01308510173112154, - -0.02415711060166359, - 0.04532881826162338, - -0.008182467892765999, - -0.0261017307639122, - -0.01442031655460596, - -0.012948156334459782, - -0.009141083806753159, - -0.008702859282493591, - -0.012996087782084942, - 0.00538536487147212, - -0.00090041384100914, - -0.016378629952669144, - -0.005912603810429573, - 0.016008879989385605, - -0.029361024498939514, - 0.006463807541877031, - -0.009161625057458878, - -0.0063474043272435665, - -0.003086399519816041, - -0.007264936342835426, - -0.002589973621070385, - 0.008456358686089516, - 0.020925207063555717, - 0.01424228772521019, - -0.0020712942350655794, - 0.006251542828977108, - -0.032428592443466187, - 0.001331790816038847, - 0.001057900721207261, - 0.0006834415253251791, - -0.009147930890321732, - 0.03185342252254486, - 0.010791271924972534, - 0.004146012011915445, - -0.030319638550281525, - -0.020665012300014496, - 0.015420014970004559, - -0.01955575682222843, - -0.005087509285658598, - -0.011968999169766903, - -0.012783822603523731, - 0.020172009244561195, - 0.0033243417274206877, - -0.019774869084358215, - -0.01197584718465805, - 0.01424228772521019, - 0.027005568146705627, - 0.018391722813248634, - -0.00992851797491312, - 0.013222047127783298, - 8.805140532786027e-05, - 0.0009055493283085525, - 0.006672648712992668, - -0.008353649638593197, - -0.004457562230527401, - 0.011297968216240406, - 0.017734387889504433, - -0.013468547724187374, - 0.019281866028904915, - 0.01939142309129238, - -0.00026682892348617315, - -0.023937998339533806, - -0.006850677542388439, - -0.008689165115356445, - -0.013858841732144356, - -0.009168473072350025, - 0.02408863790333271, - 0.020528066903352737, - 0.011736192740499973, - -0.013242588378489017, - 0.010921369306743145, - 0.0024684348609298468, - 0.023883221670985222, - -0.013660270720720291, - 0.03388021141290665, - -0.006864371709525585, - 0.022554853931069374, - 0.0014113901415839791, - 0.006210458930581808, - -0.03607133403420448, - -0.001710101612843573, - -0.009175320155918598, - 0.004070692230015993, - 0.022691799327731133, - 0.02362302504479885, - -0.003831038484349847, - 0.01135274674743414, - 0.043438978493213654, - 0.008004439994692802, - 0.005347704980522394, - -0.014050564728677273, - 0.004039879888296127, - 0.018514974042773247, - 0.001167456735856831, - -0.018295861780643463, - -0.6323575973510742, - -0.027142513543367386, - 0.023773664608597755, - 0.0051080514676868916, - 0.0004420758050400764, - 0.010551618412137032, - -0.002221933798864484, - 0.008723401464521885, - -0.010332506150007248, - 0.030812641605734825, - -0.021199097856879234, - -0.011879985220730305, - -0.021199097856879234, - -0.018213694915175438, - -0.031113920733332634, - -0.015844544395804405, - -0.003985101822763681, - -0.017035966739058495, - 0.009373890236020088, - -0.009161625057458878, - -0.008915124461054802, - 0.03598916530609131, - -0.0069636572152376175, - -0.014529872685670853, - -0.002581414533779025, - -0.026060648262500763, - -0.008689165115356445, - -0.025170505046844482, - -0.011879985220730305, - 0.01943250559270382, - -0.02680015191435814, - 6.237420166144148e-05, - -0.00923694483935833, - -0.01824108324944973, - 0.04913589358329773, - -0.003553724614903331, - -0.008928818628191948, - 0.01169510930776596, - 0.030292250216007233, - -0.008778179064393044, - -0.0031206358689814806, - -0.004686945118010044, - -0.006789051927626133, - 0.009339653886854649, - 0.009305417537689209, - -0.0074087283574044704, - -0.011640331707894802, - -0.01632385328412056, - 0.024074943736195564, - 0.005087509285658598, - -0.01826847344636917, - -0.002446181373670697, - -0.0014824303798377514, - -0.009942212142050266, - 0.009373890236020088, - 0.005522310268133879, - 0.005594206508249044, - -0.014187510125339031, - 0.010051768273115158, - -0.0031582957599312067, - 0.006761663127690554, - 0.011921068653464317, - -0.005813318304717541, - 0.01741941273212433, - -0.03492099419236183, - -0.012105944566428661, - -0.018912114202976227, - 0.012147027999162674, - 0.009887434542179108, - -0.007675771601498127, - 0.0006072657997719944, - 0.011784123256802559, - 0.0016596030909568071, - -0.03188081458210945, - 0.018624529242515564, - 0.019651617854833603, - 0.019405117258429527, - -0.010592701844871044, - -0.0015491911908611655, - -0.0039371708407998085, - -0.00477595953270793, - -0.018350640311837196, - -0.013454853557050228, - 0.009771031327545643, - 0.01609104685485363, - -0.004149435553699732, - -0.03190820291638374, - 0.023376524448394775, - 0.018487585708498955, - 0.011003537103533745, - 0.021404515951871872, - 0.021390819922089577, - -0.001819657627493143, - -0.02207554504275322, - -0.002797103254124522, - 0.023842137306928635, - -0.004642438143491745, - -0.0058852145448327065, - 0.023965388536453247, - 0.006881489884108305, - 0.0028878292068839073, - -0.013256283476948738, - 0.009141083806753159, - -0.0049368697218596935, - -0.0066007524728775024, - 0.0171866063028574, - -0.024170804768800735, - 0.008887735195457935, - 0.0206513162702322, - -0.015228291973471642, - 0.0038447328843176365, - -0.005152558442205191, - -0.009367043152451515, - 0.02118540368974209, - 0.01784394308924675, - -0.025567645207047462, - 0.00034065087675116956, - 0.04108352214097977, - 0.010264033451676369, - -0.01704966090619564, - 0.012003235518932343, - 0.012811211869120598, - 0.0027594431303441525, - -0.012181264348328114, - 0.01615951955318451, - 0.008935665711760521, - 0.007484048139303923, - -0.0026515990030020475, - -0.032236870378255844, - 0.019322950392961502, - 0.02738901413977146, - 0.006925997324287891, - 0.03201775997877121, - -0.003909782040864229, - -0.0014858540380373597, - 0.026622122153639793, - -0.0013069695560261607, - -0.012462001293897629, - 0.02451316826045513, - 0.0019993979949504137, - -0.013290519826114178, - 0.006991046015173197, - -0.021103236824274063, - 0.0019052483839914203, - -0.023308051750063896, - -0.0237873587757349, - -0.011332204565405846, - -0.009565613232553005, - -0.03199036791920662, - -0.00026768483803607523, - 0.029580136761069298, - -0.002581414533779025, - -0.010907675139605999, - -0.007545673754066229, - 0.0006278075743466616, - -0.005960534326732159, - 0.0039371708407998085, - 0.0017683032201603055, - -0.0040227617137134075, - -0.012092250399291515, - 0.006689766887575388, - 0.02521158754825592, - -0.019720090553164482, - 0.02867629937827587, - 0.011386983096599579, - 0.014091648161411285, - -0.004608201794326305, - -0.007018435280770063, - 0.008353649638593197, - -0.010592701844871044, - 0.006296049803495407, - 0.004543152637779713, - 0.014461399987339973, - -0.006193340755999088, - 0.031141309067606926, - -0.003868698375299573, - -0.015337848104536533, - 0.007258088793605566, - -0.010647479444742203, - 0.02200707420706749, - 0.03396238014101982, - -0.022951994091272354, - -0.03467449173331261, - 0.0064398422837257385, - 0.008504289202392101, - 0.0180082768201828, - -0.004033032339066267, - -0.0007797310245223343, - 0.014543566852807999, - 0.022678105160593987, - -0.00968201644718647, - -0.010681715793907642, - 0.00931911263614893, - 0.003041892545297742, - -0.011236343532800674, - -0.005577088333666325, - -0.0010313675738871098, - 0.005005342420190573, - 0.007086907513439655, - 0.012468849308788776, - 0.00935334898531437, - -0.010051768273115158, - 0.046670880168676376, - -0.014201204292476177, - -0.0012761568650603294, - -0.01602257415652275, - 0.00903837475925684, - -0.022048156708478928, - 0.022226186469197273, - 0.029634913429617882, - 0.004149435553699732, - -0.037358615547418594, - -0.022089241072535515, - -0.015241987071931362, - -0.011784123256802559, - 0.03396238014101982, - 0.0015979778254404664, - 0.01349593698978424, - -0.022910911589860916, - 0.02270549349486828, - 0.008723401464521885, - -0.009154777973890305, - 0.0008927106973715127, - -0.023513469845056534, - -0.031086532399058342, - -0.0006008464843034744, - -0.005310045089572668, - 0.0005242428742349148, - 0.010695409961044788, - -0.008716554380953312, - -0.017487885430455208, - 0.02864890918135643, - 0.01144860778003931, - 0.02128126472234726, - 0.0008019845699891448, - 0.002785120392218232, - 0.007258088793605566, - -0.001901824725791812, - 0.015255681239068508, - -0.02137712575495243, - -0.0006389343761838973, - 0.010058615356683731, - -0.003076128661632538, - 0.006569940131157637, - 0.019706396386027336, - -0.004258991684764624, - 0.044726260006427765, - 0.00860699824988842, - -0.005679796915501356, - 0.004385665990412235, - 0.007080060429871082, - -0.005330586805939674, - -0.007073212880641222, - 0.0014713036362081766, - -0.004423325881361961, - -0.028265463188290596, - -0.010106546804308891, - 0.011790971271693707, - 0.037687283009290695, - 0.045219264924526215, - 0.004478103946894407, - 0.0038755456916987896, - 0.010784424841403961, - 0.017337245866656303, - -0.005039578769356012, - -0.004139164928346872, - 0.004255568142980337, - -0.0019531790167093277, - 0.0030915350653231144, - -0.007052671164274216, - -0.022322047501802444, - -0.00475884135812521, - 0.023801054805517197, - 0.014831151813268661, - 0.015173514373600483, - 0.017159217968583107, - -0.030182695016264915, - 0.010750188492238522, - 0.00723754707723856, - 0.007258088793605566, - -0.012290820479393005, - -0.04606832191348076, - 0.008237246423959732, - 0.019774869084358215, - -0.014283371157944202, - -0.016803160309791565, - -0.02743009850382805, - -0.005912603810429573, - -0.02851196378469467, - 0.02102106809616089, - -0.016310159116983414, - -0.00010570447921054438, - -0.027964184060692787, - 0.01012708805501461, - -0.00430349912494421, - -0.001470447750762105, - 0.043767645955085754, - -0.010106546804308891, - 0.019966591149568558, - -0.017008578404784203, - 0.008867193944752216, - -0.022541159763932228, - -0.013482242822647095, - -0.010962452739477158, - 0.026909707114100456, - 0.0019651618786156178, - 0.010305116884410381, - -0.004033032339066267, - 0.01442031655460596, - -0.003041892545297742, - -0.007251241710036993, - -0.00029507384169846773, - -0.037358615547418594, - 0.0014909894671291113, - -1.866946513473522e-05, - 0.007833258248865604, - -0.03220948204398155, - -0.003023062599822879, - 0.020144620910286903, - -0.012297667562961578, - -0.010544770397245884, - -0.03360632061958313, - -0.018254779279232025, - -0.019802257418632507, - 0.14187510311603546, - 0.02558133937418461, - -0.0041151996701955795, - 0.006737697869539261, - 0.007374492473900318, - 0.004539729095995426, - -0.011715651489794254, - -0.02474597468972206, - 0.004433596972376108, - 0.0007895739399828017, - -0.003317494411021471, - 0.015680210664868355, - -0.008374190889298916, - 0.03103175386786461, - 0.002601956482976675, - 0.011147328652441502, - 0.014570956118404865, - -0.011743039824068546, - -0.007655229419469833, - 0.0006517729489132762, - 0.003290105378255248, - 0.00014272244879975915, - 0.003228480229154229, - 0.02815590798854828, - 0.007600451819598675, - 0.01592671126127243, - 0.005573664326220751, - 0.018131528049707413, - 0.011441760696470737, - -0.029744470492005348, - -0.0403166301548481, - 0.012249737046658993, - -0.0002499247493688017, - 0.009668322280049324, - -0.020213093608617783, - -0.02947057969868183, - -0.001977144507691264, - 0.020966291427612305, - 0.024759668856859207, - -0.014803762547671795, - 0.01353017333894968, - 0.003957712557166815, - -0.0034356096293777227, - -0.01840541884303093, - 0.01037358958274126, - -0.0024924003519117832, - -0.007415575906634331, - 0.005142287351191044, - -0.0004981377278454602, - -0.03409932181239128, - 0.02703295834362507, - 0.0077716330997645855, - 0.006720579694956541, - -0.014447704888880253, - -0.01978856325149536, - 0.0023725733626633883, - -0.01016132440418005, - -0.015063958242535591, - -0.032565537840127945, - 0.005844131112098694, - -0.011667720042169094, - -0.01658404804766178, - -0.00428638095036149, - -0.022856133058667183, - -0.030182695016264915, - -0.011558163911104202, - -0.019993981346488, - 0.01552957110106945, - 0.004248721059411764, - -0.0221440177410841, - 0.011270579881966114, - -0.03524966165423393, - -0.0261017307639122, - 0.009510835632681847, - 0.022513769567012787, - 0.017761776223778725, - 0.0011640330776572227, - -0.01641971431672573, - 0.0069705042988061905, - -0.01672099344432354, - 0.006895184516906738, - -0.025156810879707336, - -0.0027680022176355124, - -0.028895409777760506, - -0.03856373205780983, - -0.013098795898258686, - 0.007134838495403528, - 0.015570654533803463, - -0.013612340204417706, - 0.007333408575505018, - -0.00025912575074471533, - 0.01559804379940033, - 0.01227712631225586, - -0.005001918878406286, - -0.0022647292353212833, - 0.025786757469177246, - -0.024362528696656227, - 0.009996990673244, - -0.005827012937515974, - -0.0013865688815712929, - 0.013215200044214725, - -0.032264258712530136, - -0.0014627445489168167, - -0.015146125108003616, - -0.012811211869120598, - -0.012660572305321693, - 0.007970203645527363, - 0.020308954641222954, - -0.008367343805730343, - -0.004529458470642567, - 0.01982964761555195, - -0.046177878975868225, - -0.018884725868701935, - -0.007853800430893898, - -0.01153077557682991, - -0.015255681239068508, - 0.01064063236117363, - 0.012359293177723885, - -0.012126486748456955, - -0.01704966090619564, - -0.005827012937515974, - -0.031278256326913834, - 0.021459292620420456, - 0.016433408483862877, - -0.013235741294920444, - 0.018487585708498955, - -0.0011400677030906081, - -0.02074717916548252, - -0.010339353233575821, - -0.0060632433742284775, - 0.006611023563891649, - 0.021500376984477043, - 0.006703461520373821, - -0.0032455981709063053, - 0.00019471877021715045, - 0.015228291973471642, - -0.003961136098951101, - 0.03314070776104927, - -0.002983690705150366, - -0.0058783674612641335, - -0.009880587458610535, - -0.009860045276582241, - -0.013146727345883846, - -0.03026486188173294, - -0.011914221569895744, - -0.03891979157924652, - 0.011147328652441502, - 0.0016433409182354808, - 0.00038237631088122725, - 0.027882017195224762, - -0.00011886404536198825, - -0.027005568146705627, - -0.013256283476948738, - -0.005960534326732159, - 0.001663882634602487, - -0.011263732798397541, - 0.006470654625445604, - -0.003687246236950159, - 0.00650831451639533, - -0.0002390119479969144, - 0.030045749619603157, - -0.0003295240749139339, - -0.011113093234598637, - 0.009818961843848228, - 0.0149544021114707, - 0.00955191906541586, - 0.009476599283516407, - 0.023184800520539284, - 0.009709405712783337, - 0.009141083806753159, - 0.008086606860160828, - 0.018254779279232025, - -0.02554025687277317, - -0.002877558348700404, - -0.008894582279026508, - 0.0020918359514325857, - -0.021883822977542877, - 0.0035605719313025475, - -0.03828984126448631, - 0.0007502022199332714, - 0.0033123590983450413, - -0.007942814379930496, - -0.018282167613506317, - 0.014776373282074928, - -0.026759067550301552, - -0.03248337283730507, - 0.03349676355719566, - -0.005748269613832235, - 0.0304018072783947, - -0.012126486748456955, - 0.010921369306743145, - -0.002167155733332038, - 0.02240421436727047, - 0.02369149774312973, - 0.005060120485723019, - -0.02200707420706749, - 0.00724439462646842, - -0.016762077808380127, - 0.01863822527229786, - 0.007217005360871553, - 0.008983597159385681, - 0.012283973395824432, - -0.0017349228728562593, - 0.012578405439853668, - 0.017501579597592354, - 0.0403166301548481, - 0.007552520837634802, - -0.002831339370459318, - 0.01447509415447712, - -0.035797443240880966, - 0.005939992610365152, - -0.006073513999581337, - 0.0008302294882014394, - -0.023937998339533806, - -0.010907675139605999, - -0.007956508547067642, - 0.005741422064602375, - 0.0004908625269308686, - -0.007429270073771477, - -0.03670128062367439, - -0.007942814379930496, - -0.010996689088642597, - 0.014639428816735744, - 0.006196764763444662, - 0.021829044446349144, - 0.024143416434526443, - -0.016844244673848152, - -0.028101129457354546, - 0.00628577871248126, - -0.009161625057458878, - 0.007018435280770063, - 0.014050564728677273, - 0.006973927840590477, - -0.039275847375392914, - 0.009654628112912178, - -0.005371670704334974, - 0.02191121131181717, - 0.020528066903352737, - -0.01793980412185192, - 0.04080963134765625, - -0.003033333458006382, - 0.009175320155918598, - -0.013612340204417706, - -0.037522949278354645, - -0.018693001940846443, - 0.018391722813248634, - -0.02729315310716629, - -0.008339955471456051, - -0.006727426778525114, - -0.02782723866403103, - -0.0393306240439415, - 0.014351843856275082, - -0.009360196068882942, - 0.012722196988761425, - -0.0037283296696841717, - -0.02154145948588848, - 0.017487885430455208, - -0.007675771601498127, - -0.00788118876516819, - -0.0009166760719381273, - -0.038152895867824554, - 0.042672086507081985, - -0.018980586901307106, - 0.004389089532196522, - -0.006949962582439184, - 0.01080496609210968, - -0.02719729207456112, - -0.011612942442297935, - -0.020076148211956024, - 0.024362528696656227, - -0.05266907438635826, - 0.008860345929861069, - 0.00567637337371707, - 0.012516779825091362, - 0.014502483420073986, - -0.0008901429828256369, - -0.024526862427592278, - -0.00560790067538619, - -0.021253876388072968, - 0.0020524642895907164, - 0.013242588378489017, - -0.02755334973335266, - -0.01913122646510601, - -0.004960835445672274, - -0.0003528475353959948, - -0.014516177587211132, - -0.026786455884575844, - -0.006621294189244509, - 0.02663581632077694, - 0.0024752821773290634, - 0.0004251716600265354, - -0.021787961944937706, - -0.005217607133090496, - 0.008442663587629795, - 0.0016339259454980493, - -0.00812769029289484, - -0.012283973395824432, - 0.020035063847899437, - -0.024033861234784126, - 0.010168171487748623, - -0.010517382062971592, - 0.0239516943693161, - -0.03749556094408035, - 0.001535496674478054, - -0.006052972283214331, - -0.010140783153474331, - 0.01135274674743414, - 0.001901824725791812, - -0.027936795726418495, - -0.018651919439435005, - 0.010565312579274178, - -0.00764838233590126, - 0.02438991703093052, - -0.0052689616568386555, - 0.011407524347305298, - 0.007258088793605566, - 0.006145410239696503, - -0.009147930890321732, - -0.016734687611460686, - 0.04401414841413498, - 0.011339052580296993, - 0.014050564728677273, - -0.010914522223174572, - -0.016173213720321655, - 0.007963355630636215, - 0.018597140908241272, - 0.017871331423521042, - 0.01356440968811512, - -0.015543266199529171, - -0.0039440179243683815, - -0.004474680405110121, - 0.0037659895606338978, - 0.01107200887054205, - -0.006463807541877031, - 0.001847046660259366, - 0.004950564354658127, - -0.0013934160815551877, - -0.006059819366782904, - 0.02266440913081169, - -0.0038447328843176365, - 0.02319849468767643, - 0.01576237753033638, - 0.023937998339533806, - 0.0003511357354000211, - -0.01592671126127243, - -0.017857637256383896, - -0.02008984237909317, - 0.010400978848338127, - -0.02729315310716629, - -0.023020466789603233, - 0.003344883443787694, - 0.042151693254709244, - 0.0036701280623674393, - -0.00819616299122572, - -0.0018230812856927514, - 0.02058284543454647, - -0.019569450989365578, - 0.00022146585979498923, - -0.032565537840127945, - 0.024280361831188202, - 0.0376598946750164, - 0.030511362478137016, - 0.010489992797374725, - 0.031305644661188126, - 0.0018915538676083088, - 0.014036870561540127, - 0.0041151996701955795, - -0.025293754413723946, - 0.014776373282074928, - -0.029881415888667107, - 0.011044620536267757, - 0.024444695562124252, - -0.01077072974294424, - 0.003048739628866315, - 0.036098722368478775, - -0.01629646308720112, - -0.009401279501616955, - 0.027087735012173653, - -0.0074087283574044704, - -0.028375020250678062, - -0.01197584718465805, - 0.006258389912545681, - -0.0016544676618650556, - 0.004327464383095503, - 0.009627238847315311, - -0.023554552346467972, - -0.004471256863325834, - 0.012845448218286037, - 0.006535703781992197, - -0.010620090179145336, - -0.00025912575074471533, - 0.0035605719313025475, - -0.007422422990202904, - 0.00542644876986742, - -0.019966591149568558, - -0.01513243094086647, - 0.011585553176701069, - -0.023609330877661705, - 0.02663581632077694, - 0.02104845829308033, - 0.005248419940471649, - 0.018487585708498955, - 0.00011747319513233379, - 0.0006325150607153773, - -0.011222648434340954, - -0.005200489424169064, - 0.00964778009802103, - 0.013756132684648037, - -0.0010998401558026671, - -0.003896087408065796, - 0.0249513927847147, - 0.00012260863150004297, - 0.015091347508132458, - -0.00540248304605484, - -0.014598344452679157, - -0.012325056828558445, - 0.006118020974099636, - -0.011421219445765018, - 0.025197893381118774, - 0.00832626037299633, - -0.016077350825071335, - 0.018049361184239388, - -0.040700074285268784, - -0.014940707944333553, - -0.017994582653045654, - -0.010976147837936878, - -0.012058014050126076, - -0.029634913429617882, - -0.032264258712530136, - 0.012400376610457897, - -0.01662513241171837, - 0.0029357599560171366, - -0.0049368697218596935, - 0.005827012937515974, - -0.007080060429871082, - 0.0021260723005980253, - 0.2412424385547638, - -0.023650415241718292, - 0.029854025691747665, - 0.013742438517510891, - -0.013934161514043808, - 0.026526261121034622, - 0.005498344544321299, - 0.008024981245398521, - 0.0030127917416393757, - -0.0006817296962253749, - -0.022363130003213882, - 0.0090041384100914, - 9.404274896951392e-05, - 0.0013026900123804808, - 0.002976843621581793, - 0.01751527562737465, - -0.042206473648548126, - -0.03467449173331261, - -0.009524529799818993, - 0.01817261055111885, - -0.007901730947196484, - -0.01111994031816721, - 0.017885027453303337, - 0.0029289128724485636, - -0.001598833710886538, - 0.022061850875616074, - -0.0016604589764028788, - 0.013030324131250381, - -0.007114296779036522, - -0.013174115680158138, - -0.02848457545042038, - 0.0026978179812431335, - 0.018117833882570267, - 0.011592400260269642, - 0.01770699769258499, - -0.015707600861787796, - 0.0153652373701334, - -0.003529759356752038, - 0.024567946791648865, - 0.011106245219707489, - 0.017652219161391258, - 0.009880587458610535, - -0.003759142244234681, - -0.032401204109191895, - 0.004146012011915445, - 0.03357893228530884, - -0.00519706541672349, - -0.011818359605967999, - 0.0038070729933679104, - 0.017241384834051132, - -0.02558133937418461, - -0.020610233768820763, - 0.0012864278396591544, - 0.028375020250678062, - 0.009278029203414917, - 5.94855155213736e-05, - 0.029388412833213806, - 0.027101431041955948, - 0.0005927153979428113, - -0.0065939053893089294, - -0.008935665711760521, - 0.02144559845328331, - -0.007668924052268267, - 0.015981489792466164, - -0.0108186611905694, - 0.060474943369627, - 0.00989428162574768, - 0.00968201644718647, - 0.0010656038066372275, - -0.01203062478452921, - -0.001283004181459546, - -0.0014995485544204712, - -0.03196297958493233, - -0.008401580154895782, - -0.02795048989355564, - -0.01910383813083172, - 0.028758466243743896, - 0.021692099049687386, - 0.029333634302020073, - -0.005210760049521923, - -0.015022874809801579, - 0.0016818566946312785, - 0.008038675412535667, - 0.014160120859742165, - 0.0004784518387168646, - -0.0005726015660911798, - 0.027265764772892, - -0.008497442118823528, - -0.02584153600037098, - -0.003466422203928232, - 0.0020113808568567038, - -0.025389617308974266, - -0.0002164374163839966, - 0.01906275376677513, - 0.02864890918135643, - 0.008668622933328152, - 0.006005041301250458, - -0.0045465766452252865, - 0.006090632174164057, - -0.01128427404910326, - 0.00045577032142318785, - 0.03670128062367439, - 0.046643491834402084, - 5.969949415884912e-05, - -0.014707900583744049, - -0.017871331423521042, - -0.01101723127067089, - 0.011469149962067604, - 0.010462603531777859, - -0.040261853486299515, - -0.007867494598031044, - -0.01149653922766447, - 0.0056455605663359165, - -0.008778179064393044, - 0.010551618412137032, - -0.0016253668582066894, - -0.0012282261159271002, - 0.008134537376463413, - 0.032894205302000046, - 0.0035811136476695538, - -0.0009029815555550158, - -0.053079910576343536, - -0.015146125108003616, - -0.007360797841101885, - 0.0009406415047124028, - -0.009942212142050266, - -0.04206952825188637, - 0.0075388262048363686, - 0.000517395616043359, - -0.04275425150990486, - 0.03861851245164871, - -0.006145410239696503, - 0.02144559845328331, - -0.01576237753033638, - -0.011626636609435081, - -0.007463506422936916, - 0.025266366079449654, - 0.007751091383397579, - 8.442048624601739e-07, - 0.004512340296059847, - -0.009168473072350025, - -0.018213694915175438, - 0.00961354374885559, - 0.00819616299122572, - 0.010400978848338127, - -0.00010757677227957174, - 0.02696448564529419, - -0.022951994091272354, - -0.0031000941526144743, - 0.0029340481851249933, - -0.03152475506067276, - 0.023842137306928635, - -0.005008765961974859, - -0.015570654533803463, - 0.012503085657954216, - -0.01955575682222843, - -0.026649512350559235, - -0.005063544027507305, - -0.021103236824274063, - 0.03363370895385742, - -0.0055531226098537445, - -0.0094149736687541, - 0.030182695016264915, - -0.03259292617440224, - -0.010592701844871044, - -0.004875244572758675, - -0.17518013715744019, - 0.027375319972634315, - -0.009640933014452457, - -0.015241987071931362, - 0.02286982722580433, - -0.004625319968909025, - 0.009127389639616013, - -0.0008511992054991424, - -0.002148325787857175, - 0.009942212142050266, - 0.021897517144680023, - 0.010175018571317196, - -0.010311963967978954, - -0.024170804768800735, - 0.003721482353284955, - 0.002524924697354436, - -0.04050835222005844, - 0.010264033451676369, - 0.024841835722327232, - 0.021336043253540993, - 0.042644694447517395, - -0.00976418424397707, - 0.002278423635289073, - -0.010702257975935936, - 0.014735289849340916, - -0.005440142937004566, - -0.006925997324287891, - 0.015461099334061146, - -0.031113920733332634, - -0.017323551699519157, - -0.01281805895268917, - -0.017460497096180916, - 0.024335140362381935, - 0.01866561360657215, - 0.002177426591515541, - 0.027471181005239487, - 0.02310263365507126, - -0.023773664608597755, - -0.0353592187166214, - 0.04209691658616066, - 0.03325026482343674, - 0.013242588378489017, - 0.015844544395804405, - -0.017624830827116966, - -0.013941008597612381, - -0.002208239398896694, - -0.004139164928346872, - 0.006409029476344585, - 0.014776373282074928, - 0.005125169176608324, - 0.006641835905611515, - -0.018487585708498955, - 0.008134537376463413, - -0.006135139148682356, - 0.02895018830895424, - 0.033222876489162445, - -0.0029460308142006397, - -0.005604477133601904, - 0.02104845829308033, - -0.005470955744385719, - 0.00832626037299633, - -0.007662076968699694, - 0.020870428532361984, - -0.0014499059179797769, - 0.01016132440418005, - -0.004443867597728968, - -0.001893265638500452, - 0.03971407189965248, - -0.023308051750063896, - 0.008312566205859184, - -0.0059776525013148785, - -0.00022959697525948286, - -0.00948344636708498, - -0.03349676355719566, - 0.010982994921505451, - 0.0011220937594771385, - -0.020459594205021858, - 0.010907675139605999, - 0.0010998401558026671, - -0.0035776901058852673, - -0.021664710715413094, - 0.005611324217170477, - 0.013222047127783298, - -0.027799850329756737, - -0.008483747020363808, - 0.011373287998139858, - -0.0039371708407998085, - 0.014338149689137936, - -0.0033671369310468435, - -0.003409932367503643, - -0.007579909637570381, - -0.02339021861553192, - -0.00494714081287384, - -0.006306320894509554, - -0.0056387134827673435, - 0.014187510125339031, - 0.01777547039091587, - 0.028402408584952354, - 0.006939691491425037, - -0.009812114760279655, - -0.006597328931093216, - 0.01039413083344698, - -0.013338450342416763, - 0.012366140261292458, - -0.013427464291453362, - 0.014776373282074928, - 0.008586456067860126, - 0.016762077808380127, - 0.00430349912494421, - -0.006395334843546152, - -0.018323250114917755, - 0.02422558329999447, - 0.02128126472234726, - 0.014968096278607845, - 0.01080496609210968, - 0.008661775849759579, - 0.012900225818157196, - 0.00903837475925684, - 0.0188299473375082, - -4.161846300121397e-05, - 0.05653092637658119, - 0.016378629952669144, - -0.01945989578962326, - -0.00860699824988842, - -0.008038675412535667, - -0.02102106809616089, - -0.12609902024269104, - -0.05102573335170746, - 0.00048273138236254454, - 0.00584755465388298, - 0.009688864462077618, - 0.04814988747239113, - -0.000719389587175101, - 0.02462272346019745, - 0.0017075338400900364, - 0.025622423738241196, - -0.0023229308426380157, - -0.011777276173233986, - 0.0019805680494755507, - -0.010661173611879349, - 0.024033861234784126, - 0.009428668767213821, - -0.01969270221889019, - -0.028375020250678062, - -0.03264770656824112, - 0.0020815650932490826, - -0.009921670891344547, - -0.012756433337926865, - 0.002002821769565344, - -0.017528969794511795, - -0.0012650301214307547, - -0.008531678467988968, - -0.030292250216007233, - 0.03755033761262894, - -0.0011597536504268646, - -0.0005101204151287675, - -0.03730383887887001, - 0.004532882012426853, - 0.008661775849759579, - -0.011407524347305298, - -0.009558766148984432, - 0.004282957408577204, - -0.04590398818254471, - -0.005241572856903076, - 0.018953198567032814, - -0.018597140908241272, - 0.009620391763746738, - -0.004875244572758675, - -0.0067924754694104195, - -0.04124785587191582, - 0.005316892638802528, - 0.002620786428451538, - -0.013406923040747643, - 0.004995071794837713, - 0.026841234415769577, - -0.006388487759977579, - -0.0013814334524795413, - -0.011941610835492611, - -0.017871331423521042, - -0.007484048139303923, - -0.01287283655256033, - 0.02240421436727047, - 0.002951166359707713, - 0.003262716345489025, - -0.024472083896398544, - -0.022198796272277832, - 0.010620090179145336, - -0.0022031038533896208, - -0.02039112150669098, - 0.01595410145819187, - -0.010318811051547527, - 0.0044130547903478146, - -0.01910383813083172, - -0.003831038484349847, - 0.022376826032996178, - -0.00880556832998991, - -0.007415575906634331, - 0.005895485635846853, - -0.013249436393380165, - 0.02769029326736927, - -0.027265764772892, - -0.0007771633099764585, - -0.04357592388987541, - -0.00877133198082447, - 0.04182302579283714, - -0.002791967708617449, - -0.02851196378469467, - -0.00852483045309782, - 0.004265839233994484, - 0.015255681239068508, - 0.02497878111898899, - 0.03363370895385742, - -0.00011362161603756249, - 0.020144620910286903, - -0.017501579597592354, - -0.004875244572758675, - -0.005775658413767815, - 0.019911814481019974, - 0.004378818906843662, - 0.006001617759466171, - -0.008627539500594139, - 0.03155214339494705, - -0.00012688817514572293, - -0.009497140534222126, - -0.00024500329163856804, - 0.02623867616057396, - -0.01887103170156479, - -0.009654628112912178, - -0.07121143490076065, - 0.02385583147406578, - -0.012722196988761425, - -0.0043137697502970695, - -0.02411602810025215, - -0.01265372522175312, - -0.007011587731540203, - -0.02554025687277317, - 0.00026918266667053103, - 0.014872235246002674, - -0.02250007539987564, - 0.017720691859722137, - 0.009264334104955196, - -0.004550000187009573, - -0.0310591422021389, - -0.006758239585906267, - 0.03557832911610603, - -0.009462904185056686, - 0.004940293729305267, - 0.021390819922089577, - -0.0011588976485654712, - 0.008442663587629795, - 0.006836982909590006, - 0.032729871571063995, - -0.0003999223990831524, - 0.0013112490996718407, - -0.011133634485304356, - 0.03686561435461044, - -0.003868698375299573, - -0.010044921189546585, - 0.014502483420073986, - -0.020350037142634392, - -0.025403311476111412, - 0.020637622103095055, - 0.005012189503759146, - -0.014570956118404865, - -0.022048156708478928, - 0.016282768920063972, - -0.0074018812738358974, - 0.009490293450653553, - -0.036893002688884735, - -0.04160391539335251, - -0.01267426647245884, - -0.013468547724187374, - -0.003933747299015522, - 0.002295541809871793, - -0.0009457769338041544, - 0.006655530538409948, - -0.016515575349330902, - -0.008511136285960674, - -0.008449510671198368, - 0.015009179711341858, - -0.026608427986502647, - -0.016529271379113197, - 0.002216798486188054, - -0.01060639601200819, - 0.02326696738600731, - -0.005292926914989948, - -0.0076826186850667, - -0.018953198567032814, - 0.023609330877661705, - 0.004426749423146248, - 0.022678105160593987, - 0.0045602708123624325, - 0.0022253573406487703, - -0.0022031038533896208, - -0.01982964761555195, - -0.003656433429569006, - 0.006001617759466171, - -0.017200300469994545, - -0.01261948887258768, - -0.0024033859372138977, - 0.0027337661013007164, - 0.01125003769993782, - 0.018693001940846443, - -0.003161719301715493, - -0.020459594205021858, - 0.020665012300014496, - -0.011592400260269642, - 0.02193860150873661, - -0.0009038374992087483, - -0.015077652409672737, - -0.039987962692976, - 0.025499172508716583, - -0.00903837475925684, - 0.00564213702455163, - -0.0014173815725371242, - 0.019172310829162598, - -0.018912114202976227, - 0.02979924902319908, - -0.01121580135077238, - 0.010305116884410381, - -0.0003853719972539693, - 0.020308954641222954, - 0.006768510211259127, - 0.0010193849448114634, - 0.012996087782084942, - 0.0014601768925786018, - 0.012071708217263222, - -0.0008606141782365739, - 0.026923401281237602, - -0.021897517144680023, - 0.0012076843995600939, - -0.03218209370970726, - 0.009545071981847286, - 0.0066863433457911015, - -0.03103175386786461, - -0.009996990673244, - -0.016638826578855515, - 0.022513769567012787, - 0.022349435836076736, - 0.025485478341579437, - 0.031278256326913834, - 0.027046652510762215, - -0.011373287998139858, - 0.018200000748038292, - 0.01896689273416996, - -0.021103236824274063, - -0.016008879989385605, - 0.03979623690247536, - 0.005926297977566719, - 0.007888035848736763, - 0.004389089532196522, - -0.006480925716459751, - 0.020172009244561195, - -0.005282656289637089, - -0.004341159015893936, - 0.0020712942350655794, - 0.011243190616369247, - 0.007230699993669987, - 0.005330586805939674, - -0.008963054977357388, - -0.029963582754135132, - -0.014338149689137936, - -0.012626335956156254, - -0.01576237753033638, - -0.01447509415447712, - 0.012112791649997234, - -0.004594507161527872, - 0.02193860150873661, - 0.005019037052989006, - -0.006840406451374292, - 0.008209857158362865, - 0.0015235139289870858, - 0.013557562604546547, - 0.011386983096599579, - -0.01148284412920475, - -0.015283070504665375, - -0.024526862427592278, - 0.0216373223811388, - 0.0034047968219965696, - -0.003149736672639847, - -0.02775876596570015, - 0.00832626037299633, - 0.0002248894888907671, - 0.006634988822042942, - -0.002803950337693095, - -0.03382543474435806, - 0.028566742315888405, - 0.008031828328967094, - -0.0011768717085942626, - 0.01784394308924675, - 0.0021722912788391113, - -0.004146012011915445, - -0.03615349903702736, - 0.03344198688864708, - -0.020706094801425934, - -0.0032045147381722927, - -0.023075245320796967, - 0.010825508274137974, - 0.018063055351376534, - -0.038673289120197296, - 0.0014969808980822563, - -0.002387979766353965, - -0.00650831451639533, - 0.007381339557468891, - -0.0025779909919947386, - 0.004505492746829987, - 0.007764785550534725, - -0.007285478059202433, - 0.017392024397850037, - -0.015981489792466164, - -0.037029948085546494, - 0.015173514373600483, - 0.02897757850587368, - -0.0216373223811388, - 0.017323551699519157, - -0.017392024397850037, - ], - "index": 0, - "object": "embedding", - } - ], - "model": "text-embedding-ada-002", - "object": "list", - "usage": {"prompt_tokens": 5, "total_tokens": 5}, - } - - # Mock the sync openai api - - request_mock = RequestsMock(passthru_prefixes=("https://openaipublic")) - - request_mock.start() - - request_mock.add( - request_mock.POST, - "https://api.openai.com/v1/completions", - json=mocked_completion, - ) - - request_mock.add( - request_mock.POST, - "https://api.openai.com/v1/embeddings", - json=mocked_embedding, - ) - - # Mock the async openai api - aioresponses_obj = aioresponses() - - aioresponses_obj.start() - - aioresponses_obj.add( - url="https://api.openai.com/v1/completions", - method="POST", - payload=mocked_completion, - ) - - aioresponses_obj.add( - "https://api.openai.com/v1/embeddings", - method="POST", - payload=mocked_embedding, - ) diff --git a/src/chainlit/client/base.py b/src/chainlit/client/base.py index 14955f9be3..fe4933c6dc 100644 --- a/src/chainlit/client/base.py +++ b/src/chainlit/client/base.py @@ -15,6 +15,7 @@ from pydantic.dataclasses import dataclass from starlette.datastructures import Headers +from chainlit.prompt import Prompt from chainlit.types import ( ConversationFilter, ElementDisplay, @@ -30,8 +31,7 @@ class MessageDict(TypedDict): createdAt: Optional[int] content: str author: str - prompt: Optional[str] - llmSettings: Dict + prompt: Optional[Prompt] language: Optional[str] parentId: Optional[str] indent: Optional[int] diff --git a/src/chainlit/client/cloud.py b/src/chainlit/client/cloud.py index 1f266aa0a1..6b1c5b9878 100644 --- a/src/chainlit/client/cloud.py +++ b/src/chainlit/client/cloud.py @@ -223,7 +223,6 @@ async def get_conversation(self, conversation_id: str): humanFeedback language prompt - llmSettings authorIsUser createdAt } @@ -342,8 +341,8 @@ async def create_message(self, variables: MessageDict) -> Optional[str]: variables["conversationId"] = c_id mutation = """ - mutation ($id: ID!, $conversationId: ID!, $author: String!, $content: String!, $language: String, $prompt: String, $llmSettings: Json, $isError: Boolean, $parentId: String, $indent: Int, $authorIsUser: Boolean, $waitForAnswer: Boolean, $createdAt: StringOrFloat) { - createMessage(id: $id, conversationId: $conversationId, author: $author, content: $content, language: $language, prompt: $prompt, llmSettings: $llmSettings, isError: $isError, parentId: $parentId, indent: $indent, authorIsUser: $authorIsUser, waitForAnswer: $waitForAnswer, createdAt: $createdAt) { + mutation ($id: ID!, $conversationId: ID!, $author: String!, $content: String!, $language: String, $prompt: Json, $isError: Boolean, $parentId: String, $indent: Int, $authorIsUser: Boolean, $waitForAnswer: Boolean, $createdAt: StringOrFloat) { + createMessage(id: $id, conversationId: $conversationId, author: $author, content: $content, language: $language, prompt: $prompt, isError: $isError, parentId: $parentId, indent: $indent, authorIsUser: $authorIsUser, waitForAnswer: $waitForAnswer, createdAt: $createdAt) { id } } @@ -357,8 +356,8 @@ async def create_message(self, variables: MessageDict) -> Optional[str]: async def update_message(self, message_id: str, variables: MessageDict) -> bool: mutation = """ - mutation ($messageId: ID!, $author: String!, $content: String!, $parentId: String, $language: String, $prompt: String, $llmSettings: Json) { - updateMessage(messageId: $messageId, author: $author, content: $content, parentId: $parentId, language: $language, prompt: $prompt, llmSettings: $llmSettings) { + mutation ($messageId: ID!, $author: String!, $content: String!, $parentId: String, $language: String, $prompt: Json) { + updateMessage(messageId: $messageId, author: $author, content: $content, parentId: $parentId, language: $language, prompt: $prompt) { id } } diff --git a/src/chainlit/client/local.py b/src/chainlit/client/local.py index d647ee0c5c..2c0d4e2c8f 100644 --- a/src/chainlit/client/local.py +++ b/src/chainlit/client/local.py @@ -31,18 +31,18 @@ def __init__(self, user_infos: Optional[UserDict] = None): self.user_infos = user_infos def before_write(self, variables: Dict): - if "llmSettings" in variables: + if "prompt" in variables: # Sqlite doesn't support json fields, so we need to serialize it. - variables["llmSettings"] = json.dumps(variables["llmSettings"]) + variables["prompt"] = json.dumps(variables["prompt"]) if "forIds" in variables: # Sqlite doesn't support list of primitives, so we need to serialize it. variables["forIds"] = json.dumps(variables["forIds"]) def after_read(self, variables: Dict): - if "llmSettings" in variables: + if "prompt" in variables: # Sqlite doesn't support json fields, so we need to parse it. - variables["llmSettings"] = json.loads(variables["llmSettings"]) + variables["prompt"] = json.loads(variables["prompt"]) async def get_conversation_id(self): self.conversation_id = await self.create_conversation() @@ -100,8 +100,8 @@ async def get_conversation(self, conversation_id: str): ) for m in c.messages or []: - if m.llmSettings: - m.llmSettings = json.loads(m.llmSettings) + if m.prompt: + m.prompt = json.loads(m.prompt) for e in c.elements or []: if e.forIds: diff --git a/src/chainlit/db/prisma/schema.prisma b/src/chainlit/db/prisma/schema.prisma index a8afe7672a..637d675760 100644 --- a/src/chainlit/db/prisma/schema.prisma +++ b/src/chainlit/db/prisma/schema.prisma @@ -54,7 +54,7 @@ model Message { humanFeedback Int @default(0) language String? parentId String? - prompt String? + // Sqlite does not support JSON - llmSettings String? + prompt String? } diff --git a/src/chainlit/frontend/.eslintignore b/src/chainlit/frontend/.eslintignore new file mode 100644 index 0000000000..76add878f8 --- /dev/null +++ b/src/chainlit/frontend/.eslintignore @@ -0,0 +1,2 @@ +node_modules +dist \ No newline at end of file diff --git a/src/chainlit/frontend/.eslintrc b/src/chainlit/frontend/.eslintrc new file mode 100644 index 0000000000..d315386999 --- /dev/null +++ b/src/chainlit/frontend/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-explicit-any": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", // or "error" + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_", + "ignoreRestSiblings": true + } + ] + } +} diff --git a/src/chainlit/frontend/package.json b/src/chainlit/frontend/package.json index 3fca0781d9..ed42cab2ae 100644 --- a/src/chainlit/frontend/package.json +++ b/src/chainlit/frontend/package.json @@ -51,6 +51,7 @@ "@babel/preset-typescript": "^7.22.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", + "@trivago/prettier-plugin-sort-imports": "^4.1.1", "@types/draft-js": "^0.11.10", "@types/lodash": "^4.14.192", "@types/node": "^20.0.0", diff --git a/src/chainlit/frontend/pnpm-lock.yaml b/src/chainlit/frontend/pnpm-lock.yaml index 4f2e618b13..568540ffb9 100644 --- a/src/chainlit/frontend/pnpm-lock.yaml +++ b/src/chainlit/frontend/pnpm-lock.yaml @@ -99,19 +99,22 @@ dependencies: devDependencies: '@babel/preset-env': specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.9) + version: 7.22.5(@babel/core@7.22.10) '@babel/preset-react': specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.9) + version: 7.22.5(@babel/core@7.22.10) '@babel/preset-typescript': specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.9) + version: 7.22.5(@babel/core@7.22.10) '@testing-library/jest-dom': specifier: ^5.16.5 version: 5.16.5 '@testing-library/react': specifier: ^14.0.0 version: 14.0.0(react-dom@18.2.0)(react@18.2.0) + '@trivago/prettier-plugin-sort-imports': + specifier: ^4.1.1 + version: 4.1.1(prettier@2.8.8) '@types/draft-js': specifier: ^0.11.10 version: 0.11.10 @@ -183,8 +186,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@adobe/css-tools@4.2.0: - resolution: {integrity: sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==} + /@adobe/css-tools@4.3.0: + resolution: {integrity: sha512-+RNNcQvw2V1bmnBTPAtOLfW/9mhH2vC67+rUSi5T8EtEWt6lEnGNY2GuhZ1/YwbgikT1TkhvidCDmN5Q5YCo/w==} dev: true /@ampproject/remapping@2.2.1: @@ -192,7 +195,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true /@auth0/auth0-react@2.0.1(react-dom@18.2.0)(react@18.2.0): @@ -210,31 +213,32 @@ packages: resolution: {integrity: sha512-21qEf5Bjouy76CWd1gQgf/tT6iD513YFYaK0+3OF1nbwLtPFpxm5Ln94M7SCVFKfe5jbchWuEcIb1HLer3r6RA==} dev: false - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@babel/code-frame@7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.10 + chalk: 2.4.2 /@babel/compat-data@7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.22.9: - resolution: {integrity: sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==} + /@babel/core@7.22.10: + resolution: {integrity: sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) - '@babel/helpers': 7.22.6 - '@babel/parser': 7.22.7 + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) + '@babel/helpers': 7.22.10 + '@babel/parser': 7.22.10 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.10 + '@babel/types': 7.22.10 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -244,13 +248,22 @@ packages: - supports-color dev: true - /@babel/generator@7.22.9: - resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} + /@babel/generator@7.17.7: + resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 + jsesc: 2.5.2 + source-map: 0.5.7 + dev: true + + /@babel/generator@7.22.10: + resolution: {integrity: sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 dev: true @@ -258,71 +271,68 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true - /@babel/helper-builder-binary-assignment-operator-visitor@7.22.5: - resolution: {integrity: sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==} + /@babel/helper-builder-binary-assignment-operator-visitor@7.22.10: + resolution: {integrity: sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true - /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} + /@babel/helper-compilation-targets@7.22.10: + resolution: {integrity: sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 '@babel/helper-validator-option': 7.22.5 - browserslist: 4.21.9 + browserslist: 4.21.10 lru-cache: 5.1.1 semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ==} + /@babel/helper-create-class-features-plugin@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-5IBb77txKYQPpOEdUdIhBx8VrZyDCQ+H82H0+5dX1TmuscP5vJKEE3cKurjtIw/vFwzbVH48VweE78kVDBrqjA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.10) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 dev: true - /@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.22.9): + /@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.22.10): resolution: {integrity: sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.4.1(@babel/core@7.22.9): - resolution: {integrity: sha512-kX4oXixDxG197yhX+J3Wp+NpL2wuCFjWQAr6yX2jtCnflK9ulMI51ULFGIrWiX1jGfvAxdHp+XQCcP2bZGPs9A==} + /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.10): + resolution: {integrity: sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==} peerDependencies: - '@babel/core': ^7.4.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.2 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -337,36 +347,36 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-member-expression-to-functions@7.22.5: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 - /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): + /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.10): resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 @@ -378,7 +388,7 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-plugin-utils@7.22.5: @@ -386,25 +396,25 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.22.9): + /@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.22.10): resolution: {integrity: sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-wrap-function': 7.22.9 + '@babel/helper-wrap-function': 7.22.10 dev: true - /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.9): + /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.10): resolution: {integrity: sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 @@ -414,21 +424,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-string-parser@7.22.5: @@ -444,1047 +454,1065 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-wrap-function@7.22.9: - resolution: {integrity: sha512-sZ+QzfauuUEfxSEjKFmi3qDSHgLsTPK/pEpoD/qonZKOtTPTLbf59oabPQ4rKekt9lFcj/hTZaOhWwFYrgjk+Q==} + /@babel/helper-wrap-function@7.22.10: + resolution: {integrity: sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.22.5 '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true - /@babel/helpers@7.22.6: - resolution: {integrity: sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==} + /@babel/helpers@7.22.10: + resolution: {integrity: sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.10 + '@babel/types': 7.22.10 transitivePeerDependencies: - supports-color dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.22.10: + resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.17.0 dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.9): + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.22.9): + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.22.9) + '@babel/plugin-transform-optional-chaining': 7.22.10(@babel/core@7.22.10) dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.9): + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.10): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 dev: true - /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.22.9): + /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.22.10): resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==} engines: {node: '>=4'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.9): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.10): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.9): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.10): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.10): resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.10): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.10): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.9): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.10): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.9): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.10): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.10): resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.9): + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.10): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.9): + /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.9): + /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.10): resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-async-generator-functions@7.22.7(@babel/core@7.22.9): - resolution: {integrity: sha512-7HmE7pk/Fmke45TODvxvkxRMV9RazV+ZZzhOL9AG8G29TLrr3jkjwF7uJfxZ30EoXpO+LJkq4oA8NjO2DTnEDg==} + /@babel/plugin-transform-async-generator-functions@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-eueE8lvKVzq5wIObKK/7dvoeKJ+xc6TvRn6aysIjS6pSCeLy7S/eVi7pEQknZqyqvzaNKdDtem8nUNTBgDVR2g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.9) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.10) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-module-imports': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.9) + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==} + /@babel/plugin-transform-block-scoping@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-1+kVpGAOOI1Albt6Vse7c8pHzcZQdQKW+wJH+g8mCaszOdDVwRXa/slHPqIw+oJAJANTKDMuM2cBdV0Dg618Vg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-class-features-plugin': 7.22.10(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-class-features-plugin': 7.22.10(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.9) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-classes@7.22.6(@babel/core@7.22.9): + /@babel/plugin-transform-classes@7.22.6(@babel/core@7.22.10): resolution: {integrity: sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.10) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 dev: true - /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/template': 7.22.5 dev: true - /@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==} + /@babel/plugin-transform-destructuring@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-dPJrL0VOyxqLM9sritNbMSGx/teueHF/htMKrPT7DNxccXxRDPYqlgPFFdr8u+F+qUZOkZoXue/6rL5O5GduEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 + '@babel/core': 7.22.10 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 dev: true - /@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 dev: true - /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.9) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-optional-chaining@7.22.6(@babel/core@7.22.9): - resolution: {integrity: sha512-Vd5HiWml0mDVtcLHIoEU5sw6HOUW/Zk0acLs/SAeuLzkGNOPc9DB4nkUajemhCmTIz3eiaKREZn2hQQqF79YTg==} + /@babel/plugin-transform-optional-chaining@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-MMkQqZAZ+MGj+jGTG3OTuhKeBpNcO+0oCEbrGNEaOmiEn+1MzRyQlYsruGiU8RTK3zV6XwrVJTmwiDOyYK6J9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-class-features-plugin': 7.22.10(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/helper-create-class-features-plugin': 7.22.10(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.9) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-display-name@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-display-name@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-PVk3WPYudRF5z4GKMEYUrLjPl38fJSKNaEOkFuoprioowGuWN6w2RKznuFNSlJx7pzzXXStPUnNSOEO0jL5EVw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-jsx-development@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-jsx-development@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-rog5gZaVbUip5iWDMTYbVM15XQq+RkUKhET/IHR6oizR+JEoN6CAfTTuHcK4vwUyzca30qqHqEpzBOnaRMWYMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.9) - '@babel/types': 7.22.5 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.10) + '@babel/types': 7.22.10 dev: true - /@babel/plugin-transform-react-pure-annotations@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-react-pure-annotations@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-gP4k85wx09q+brArVinTXhWiyzLl9UpmGva0+mWyKxk6JZequ05x3eUcIUE+FyttPKJFRRVtAvQaJ6YF9h1ZpA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==} + /@babel/plugin-transform-regenerator@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - regenerator-transform: 0.15.1 + regenerator-transform: 0.15.2 dev: true - /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-typescript@7.22.9(@babel/core@7.22.9): - resolution: {integrity: sha512-BnVR1CpKiuD0iobHPaM1iLvcwPYN2uVFAqoLVSpEDKWuOikoCv5HbKLxclhKYUXlWkX86DoZGtqI4XhbOsyrMg==} + /@babel/plugin-transform-typescript@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-7++c8I/ymsDo4QQBAgbraXLzIM6jmfao11KgIBEYZRReWzNWH9NtNgJcyrZiXsOPh523FQm6LfpLyy/U5fn46A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/helper-create-class-features-plugin': 7.22.10(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.9) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.10) dev: true - /@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.22.9): - resolution: {integrity: sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==} + /@babel/plugin-transform-unicode-escapes@7.22.10(@babel/core@7.22.10): + resolution: {integrity: sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.9): + /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.10) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/preset-env@7.22.5(@babel/core@7.22.9): + /@babel/preset-env@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.9) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.9) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.9) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.9) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-async-generator-functions': 7.22.7(@babel/core@7.22.9) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-classes': 7.22.6(@babel/core@7.22.9) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.22.9) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.9) - '@babel/preset-modules': 0.1.5(@babel/core@7.22.9) - '@babel/types': 7.22.5 - babel-plugin-polyfill-corejs2: 0.4.4(@babel/core@7.22.9) - babel-plugin-polyfill-corejs3: 0.8.2(@babel/core@7.22.9) - babel-plugin-polyfill-regenerator: 0.5.1(@babel/core@7.22.9) - core-js-compat: 3.31.1 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.10) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.10) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.10) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.10) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.10) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.10) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.10) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.10) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.10) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.10) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.10) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-async-generator-functions': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-block-scoping': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-classes': 7.22.6(@babel/core@7.22.10) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-destructuring': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-optional-chaining': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-regenerator': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-unicode-escapes': 7.22.10(@babel/core@7.22.10) + '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.10) + '@babel/preset-modules': 0.1.6(@babel/core@7.22.10) + '@babel/types': 7.22.10 + babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.10) + babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.10) + babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.10) + core-js-compat: 3.32.0 semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/preset-modules@0.1.5(@babel/core@7.22.9): - resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==} + /@babel/preset-modules@0.1.6(@babel/core@7.22.10): + resolution: {integrity: sha512-ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.22.9) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.9) - '@babel/types': 7.22.5 + '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.22.10) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.10) + '@babel/types': 7.22.10 esutils: 2.0.3 dev: true - /@babel/preset-react@7.22.5(@babel/core@7.22.9): + /@babel/preset-react@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-M+Is3WikOpEJHgR385HbuCITPTaPRaNkibTEa9oiofmJvIsrceb4yp9RL9Kb+TE8LznmeyZqpP+Lopwcx59xPQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-react-jsx-development': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-react-pure-annotations': 7.22.5(@babel/core@7.22.9) + '@babel/plugin-transform-react-display-name': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-react-jsx-development': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-react-pure-annotations': 7.22.5(@babel/core@7.22.10) dev: true - /@babel/preset-typescript@7.22.5(@babel/core@7.22.9): + /@babel/preset-typescript@7.22.5(@babel/core@7.22.10): resolution: {integrity: sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.9 + '@babel/core': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-typescript': 7.22.9(@babel/core@7.22.9) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-typescript': 7.22.10(@babel/core@7.22.10) dev: true /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime@7.22.6: - resolution: {integrity: sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==} + /@babel/runtime@7.22.10: + resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.11 + regenerator-runtime: 0.14.0 /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/code-frame': 7.22.10 + '@babel/parser': 7.22.10 + '@babel/types': 7.22.10 dev: true - /@babel/traverse@7.22.8: - resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} + /@babel/traverse@7.17.3: + resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.17.7 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/parser': 7.22.10 + '@babel/types': 7.17.0 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/traverse@7.22.10: + resolution: {integrity: sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.22.10 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.10 + '@babel/types': 7.22.10 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -1499,8 +1527,8 @@ packages: to-fast-properties: 2.0.0 dev: true - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + /@babel/types@7.22.10: + resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -1515,7 +1543,7 @@ packages: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: '@babel/helper-module-imports': 7.22.5 - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/hash': 0.9.1 '@emotion/memoize': 0.8.1 '@emotion/serialize': 1.1.2 @@ -1560,7 +1588,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 @@ -1596,7 +1624,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.1 '@emotion/react': 11.10.6(@types/react@18.0.27)(react@18.2.0) @@ -1810,16 +1838,16 @@ packages: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: eslint: 8.40.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + /@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: true - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} + /@eslint/eslintrc@2.1.1: + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -1865,8 +1893,8 @@ packages: engines: {node: '>=8'} dev: true - /@jest/expect-utils@29.6.1: - resolution: {integrity: sha512-o319vIf5pEMx0LmzSxxkYYxo4wrRLKHq9dP1yJU7FoPTB0LfAKSz8SWD6D/6U3v/O52t9cF5t+MeJiRsfk7zMw==} + /@jest/expect-utils@29.6.2: + resolution: {integrity: sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.4.3 @@ -1896,11 +1924,11 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true @@ -1909,18 +1937,14 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: true - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@mui/base@5.0.0-alpha.118(@types/react@18.0.27)(react-dom@18.2.0)(react@18.2.0): @@ -1934,10 +1958,10 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/is-prop-valid': 1.2.1 '@mui/types': 7.2.4(@types/react@18.0.27) - '@mui/utils': 5.14.1(react@18.2.0) + '@mui/utils': 5.14.4(react@18.2.0) '@popperjs/core': 2.11.8 '@types/react': 18.0.27 clsx: 1.2.1 @@ -1958,10 +1982,10 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/is-prop-valid': 1.2.1 '@mui/types': 7.2.4(@types/react@18.0.27) - '@mui/utils': 5.14.1(react@18.2.0) + '@mui/utils': 5.14.4(react@18.2.0) '@popperjs/core': 2.11.8 '@types/react': 18.0.27 clsx: 1.2.1 @@ -1971,8 +1995,8 @@ packages: react-is: 18.2.0 dev: false - /@mui/core-downloads-tracker@5.14.1: - resolution: {integrity: sha512-mIa1WmDmNr1LoupV1Rbxt9bTFKMbIn10RHG1bnZ/FJCkAYpuU/D4n+R+ttiycgcZNngU++zyh/OQeJblzbQPzg==} + /@mui/core-downloads-tracker@5.14.4: + resolution: {integrity: sha512-pW2XghSi3hpYKX57Wu0SCWMTSpzvXZmmucj3TcOJWaCiFt4xr05w2gcwBZi36dAp9uvd9//9N51qbblmnD+GPg==} dev: false /@mui/icons-material@5.11.9(@mui/material@5.11.10)(@types/react@18.0.27)(react@18.2.0): @@ -1986,7 +2010,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@mui/material': 5.11.10(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.0.27 react: 18.2.0 @@ -2010,14 +2034,14 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/react': 11.10.6(@types/react@18.0.27)(react@18.2.0) '@emotion/styled': 11.10.6(@emotion/react@11.10.6)(@types/react@18.0.27)(react@18.2.0) '@mui/base': 5.0.0-alpha.120(@types/react@18.0.27)(react-dom@18.2.0)(react@18.2.0) '@mui/material': 5.11.10(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react-dom@18.2.0)(react@18.2.0) - '@mui/system': 5.14.1(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0) + '@mui/system': 5.14.4(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0) '@mui/types': 7.2.4(@types/react@18.0.27) - '@mui/utils': 5.14.1(react@18.2.0) + '@mui/utils': 5.14.4(react@18.2.0) '@types/react': 18.0.27 clsx: 1.2.1 prop-types: 15.8.1 @@ -2043,14 +2067,14 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/react': 11.10.6(@types/react@18.0.27)(react@18.2.0) '@emotion/styled': 11.10.6(@emotion/react@11.10.6)(@types/react@18.0.27)(react@18.2.0) '@mui/base': 5.0.0-alpha.118(@types/react@18.0.27)(react-dom@18.2.0)(react@18.2.0) - '@mui/core-downloads-tracker': 5.14.1 - '@mui/system': 5.14.1(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0) + '@mui/core-downloads-tracker': 5.14.4 + '@mui/system': 5.14.4(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0) '@mui/types': 7.2.4(@types/react@18.0.27) - '@mui/utils': 5.14.1(react@18.2.0) + '@mui/utils': 5.14.4(react@18.2.0) '@types/react': 18.0.27 '@types/react-transition-group': 4.4.6 clsx: 1.2.1 @@ -2062,8 +2086,8 @@ packages: react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) dev: false - /@mui/private-theming@5.13.7(@types/react@18.0.27)(react@18.2.0): - resolution: {integrity: sha512-qbSr+udcij5F9dKhGX7fEdx2drXchq7htLNr2Qg2Ma+WJ6q0ERlEqGSBiPiVDJkptcjeVL4DGmcf1wl5+vD4EA==} + /@mui/private-theming@5.14.4(@types/react@18.0.27)(react@18.2.0): + resolution: {integrity: sha512-ISXsHDiQ3z1XA4IuKn+iXDWvDjcz/UcQBiFZqtdoIsEBt8CB7wgdQf3LwcwqO81dl5ofg/vNQBEnXuKfZHrnYA==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -2072,8 +2096,8 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 - '@mui/utils': 5.14.1(react@18.2.0) + '@babel/runtime': 7.22.10 + '@mui/utils': 5.14.4(react@18.2.0) '@types/react': 18.0.27 prop-types: 15.8.1 react: 18.2.0 @@ -2092,7 +2116,7 @@ packages: '@emotion/styled': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/cache': 11.11.0 '@emotion/react': 11.10.6(@types/react@18.0.27)(react@18.2.0) '@emotion/styled': 11.10.6(@emotion/react@11.10.6)(@types/react@18.0.27)(react@18.2.0) @@ -2101,8 +2125,8 @@ packages: react: 18.2.0 dev: false - /@mui/system@5.14.1(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0): - resolution: {integrity: sha512-u+xlsU34Jdkgx1CxmBnIC4Y08uPdVX5iEd3S/1dggDFtOGp+Lj8xmKRJAQ8PJOOJLOh8pDwaZx4AwXikL4l1QA==} + /@mui/system@5.14.4(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(@types/react@18.0.27)(react@18.2.0): + resolution: {integrity: sha512-oPgfWS97QNfHcDBapdkZIs4G5i85BJt69Hp6wbXF6s7vi3Evcmhdk8AbCRW6n0sX4vTj8oe0mh0RIm1G2A1KDA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -2117,15 +2141,15 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@emotion/react': 11.10.6(@types/react@18.0.27)(react@18.2.0) '@emotion/styled': 11.10.6(@emotion/react@11.10.6)(@types/react@18.0.27)(react@18.2.0) - '@mui/private-theming': 5.13.7(@types/react@18.0.27)(react@18.2.0) + '@mui/private-theming': 5.14.4(@types/react@18.0.27)(react@18.2.0) '@mui/styled-engine': 5.13.2(@emotion/react@11.10.6)(@emotion/styled@11.10.6)(react@18.2.0) '@mui/types': 7.2.4(@types/react@18.0.27) - '@mui/utils': 5.14.1(react@18.2.0) + '@mui/utils': 5.14.4(react@18.2.0) '@types/react': 18.0.27 - clsx: 1.2.1 + clsx: 2.0.0 csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 @@ -2142,13 +2166,13 @@ packages: '@types/react': 18.0.27 dev: false - /@mui/utils@5.14.1(react@18.2.0): - resolution: {integrity: sha512-39KHKK2JeqRmuUcLDLwM+c2XfVC136C5/yUyQXmO2PVbOb2Bol4KxtkssEqCbTwg87PSCG3f1Tb0keRsK7cVGw==} + /@mui/utils@5.14.4(react@18.2.0): + resolution: {integrity: sha512-4ANV0txPD3x0IcTCSEHKDWnsutg1K3m6Vz5IckkbLXVYu17oOZCVUdOKsb/txUmaCd0v0PmSRe5PW+Mlvns5dQ==} engines: {node: '>=12.0.0'} peerDependencies: react: ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@types/prop-types': 15.7.5 '@types/react-is': 18.2.1 prop-types: 15.8.1 @@ -2156,11 +2180,6 @@ packages: react-is: 18.2.0 dev: false - /@nicolo-ribaudo/semver-v6@6.3.3: - resolution: {integrity: sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg==} - hasBin: true - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2198,8 +2217,8 @@ packages: resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} dev: false - /@swc/core-darwin-arm64@1.3.70: - resolution: {integrity: sha512-31+mcl0dgdRHvZRjhLOK9V6B+qJ7nxDZYINr9pBlqGWxknz37Vld5KK19Kpr79r0dXUZvaaelLjCnJk9dA2PcQ==} + /@swc/core-darwin-arm64@1.3.75: + resolution: {integrity: sha512-anDnx9L465lGbjB2mvcV54NGHW6illr0IDvVV7JmkabYUVneaRdQvTr0tbHv3xjHnjrK1wuwVOHKV0LcQF2tnQ==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -2207,8 +2226,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.3.70: - resolution: {integrity: sha512-GMFJ65E18zQC80t0os+TZvI+8lbRuitncWVge/RXmXbVLPRcdykP4EJ87cqzcG5Ah0z18/E0T+ixD6jHRisrYQ==} + /@swc/core-darwin-x64@1.3.75: + resolution: {integrity: sha512-dIHDfrLmeZfr2xwi1whO7AmzdI3HdamgvxthaL+S8L1x8TeczAZEvsmZTjy3s8p3Va4rbGXcb3+uBhmfkqCbfw==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -2216,8 +2235,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.70: - resolution: {integrity: sha512-wjhCwS8LCiAq2VedF1b4Bryyw68xZnfMED4pLRazAl8BaUlDFANfRBORNunxlfHQj4V3x39IaiLgCZRHMdzXBg==} + /@swc/core-linux-arm-gnueabihf@1.3.75: + resolution: {integrity: sha512-qeJmvMGrjC6xt+G0R4kVqqxvlhxJx7tTzhcEoWgLJnfvGZiF6SJdsef4OSM7HuReXrlBoEtJbfGPrLJtbV+C0w==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -2225,8 +2244,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.70: - resolution: {integrity: sha512-9D/Rx67cAOnMiexvCqARxvhj7coRajTp5HlJHuf+rfwMqI2hLhpO9/pBMQxBUAWxODO/ksQ/OF+GJRjmtWw/2A==} + /@swc/core-linux-arm64-gnu@1.3.75: + resolution: {integrity: sha512-sqA9JqHEJBF4AdNuwo5zRqq0HC3l31SPsG9zpRa4nRzG5daBBJ80H7fi6PZQud1rfNNq+Q08gjYrdrxwHstvjw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -2234,8 +2253,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.70: - resolution: {integrity: sha512-gkjxBio7XD+1GlQVVyPP/qeFkLu83VhRHXaUrkNYpr5UZG9zZurBERT9nkS6Y+ouYh+Q9xmw57aIyd2KvD2zqQ==} + /@swc/core-linux-arm64-musl@1.3.75: + resolution: {integrity: sha512-95rQT5xTAL3eKhMJbJbLsZHHP9EUlh1rcrFoLf0gUApoVF8g94QjZ9hYZiI72mMP5WPjgTEXQVnVB9O2GxeaLw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -2243,8 +2262,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu@1.3.70: - resolution: {integrity: sha512-/nCly+V4xfMVwfEUoLLAukxUSot/RcSzsf6GdsGTjFcrp5sZIntAjokYRytm3VT1c2TK321AfBorsi9R5w8Y7Q==} + /@swc/core-linux-x64-gnu@1.3.75: + resolution: {integrity: sha512-If7UpAhnPduMmtC+TSgPpZ1UXZfp2hIpjUFxpeCmHHYLS6Fn/2GZC5hpEiu+wvFJF0hzPh93eNAHa9gUxGUG+w==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2252,8 +2271,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl@1.3.70: - resolution: {integrity: sha512-HoOsPJbt361KGKaivAK0qIiYARkhzlxeAfvF5NlnKxkIMOZpQ46Lwj3tR0VWohKbrhS+cYKFlVuDi5XnDkx0XA==} + /@swc/core-linux-x64-musl@1.3.75: + resolution: {integrity: sha512-HOhxX0YNHTElCZqIviquka3CGYTN8rSQ6BdFfSk/K0O+ZEHx3qGte0qr+gGLPF/237GxreUkp3OMaWKuURtuCg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2261,8 +2280,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc@1.3.70: - resolution: {integrity: sha512-hm4IBK/IaRil+aj1cWU6f0GyAdHpw/Jr5nyFYLM2c/tt7w2t5hgb8NjzM2iM84lOClrig1fG6edj2vCF1dFzNQ==} + /@swc/core-win32-arm64-msvc@1.3.75: + resolution: {integrity: sha512-7QPI+mvBXAerVfWahrgBNe+g7fK8PuetxFnZSEmXUcDXvWcdJXAndD7GjAJzbDyjQpLKHbsDKMiHYvfNxZoN/A==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -2270,8 +2289,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.3.70: - resolution: {integrity: sha512-5cgKUKIT/9Fp5fCA+zIjYCQ4dSvjFYOeWGZR3QiTXGkC4bGa1Ji9SEPyeIAX0iruUnKjYaZB9RvHK2tNn7RLrQ==} + /@swc/core-win32-ia32-msvc@1.3.75: + resolution: {integrity: sha512-EfABCy4Wlq7O5ShWsm32FgDkSjyeyj/SQ4wnUIvWpkXhgfT1iNXky7KRU1HtX+SmnVk/k/NnabVZpIklYbjtZA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -2279,8 +2298,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.3.70: - resolution: {integrity: sha512-LE8lW46+TQBzVkn2mHBlk8DIElPIZ2dO5P8AbJiARNBAnlqQWu67l9gWM89UiZ2l33J2cI37pHzON3tKnT8f9g==} + /@swc/core-win32-x64-msvc@1.3.75: + resolution: {integrity: sha512-cTvP0pOD9C3pSp1cwtt85ZsrUkQz8RZfSPhM+jCGxKxmoowDCnInoOQ4Ica/ehyuUnQ4/IstSdYtYpO5yzPDJg==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -2288,8 +2307,8 @@ packages: dev: true optional: true - /@swc/core@1.3.70: - resolution: {integrity: sha512-LWVWlEDLlOD25PvA2NEz41UzdwXnlDyBiZbe69s3zM0DfCPwZXLUm79uSqH9ItsOjTrXSL5/1+XUL6C/BZwChA==} + /@swc/core@1.3.75: + resolution: {integrity: sha512-YLqd5oZVnaOq/OzkjRSsJUQqAfKYiD0fzUyVUPVlNNCoQEfVfSMcXH80hLmYe9aDH0T/a7qEMjWyIr/0kWqy1A==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -2298,24 +2317,24 @@ packages: '@swc/helpers': optional: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.70 - '@swc/core-darwin-x64': 1.3.70 - '@swc/core-linux-arm-gnueabihf': 1.3.70 - '@swc/core-linux-arm64-gnu': 1.3.70 - '@swc/core-linux-arm64-musl': 1.3.70 - '@swc/core-linux-x64-gnu': 1.3.70 - '@swc/core-linux-x64-musl': 1.3.70 - '@swc/core-win32-arm64-msvc': 1.3.70 - '@swc/core-win32-ia32-msvc': 1.3.70 - '@swc/core-win32-x64-msvc': 1.3.70 + '@swc/core-darwin-arm64': 1.3.75 + '@swc/core-darwin-x64': 1.3.75 + '@swc/core-linux-arm-gnueabihf': 1.3.75 + '@swc/core-linux-arm64-gnu': 1.3.75 + '@swc/core-linux-arm64-musl': 1.3.75 + '@swc/core-linux-x64-gnu': 1.3.75 + '@swc/core-linux-x64-musl': 1.3.75 + '@swc/core-win32-arm64-msvc': 1.3.75 + '@swc/core-win32-ia32-msvc': 1.3.75 + '@swc/core-win32-x64-msvc': 1.3.75 dev: true /@testing-library/dom@9.3.1: resolution: {integrity: sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==} engines: {node: '>=14'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/runtime': 7.22.6 + '@babel/code-frame': 7.22.10 + '@babel/runtime': 7.22.10 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 @@ -2328,9 +2347,9 @@ packages: resolution: {integrity: sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==} engines: {node: '>=8', npm: '>=6', yarn: '>=1'} dependencies: - '@adobe/css-tools': 4.2.0 - '@babel/runtime': 7.22.6 - '@types/testing-library__jest-dom': 5.14.8 + '@adobe/css-tools': 4.3.0 + '@babel/runtime': 7.22.10 + '@types/testing-library__jest-dom': 5.14.9 aria-query: 5.3.0 chalk: 3.0.0 css.escape: 1.5.1 @@ -2346,7 +2365,7 @@ packages: react: ^18.0.0 react-dom: ^18.0.0 dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 '@testing-library/dom': 9.3.1 '@types/react-dom': 18.0.10 react: 18.2.0 @@ -2357,6 +2376,26 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} + /@trivago/prettier-plugin-sort-imports@4.1.1(prettier@2.8.8): + resolution: {integrity: sha512-dQ2r2uzNr1x6pJsuh/8x0IRA3CBUB+pWEW3J/7N98axqt7SQSm+2fy0FLNXvXGg77xEDC7KHxJlHfLYyi7PDcw==} + peerDependencies: + '@vue/compiler-sfc': 3.x + prettier: 2.x + peerDependenciesMeta: + '@vue/compiler-sfc': + optional: true + dependencies: + '@babel/generator': 7.17.7 + '@babel/parser': 7.22.10 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 + javascript-natural-sort: 0.7.1 + lodash: 4.17.21 + prettier: 2.8.8 + transitivePeerDependencies: + - supports-color + dev: true + /@types/aria-query@5.0.1: resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} dev: true @@ -2407,8 +2446,8 @@ packages: /@types/jest@29.5.3: resolution: {integrity: sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==} dependencies: - expect: 29.6.1 - pretty-format: 29.6.1 + expect: 29.6.2 + pretty-format: 29.6.2 dev: true /@types/json-schema@7.0.12: @@ -2500,8 +2539,8 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true - /@types/testing-library__jest-dom@5.14.8: - resolution: {integrity: sha512-NRfJE9Cgpmu4fx716q9SYmU4jxxhYRU1BQo239Txt/9N3EC745XZX1Yl7h/SBIDlo1ANVOCRB4YDXjaQdoKCHQ==} + /@types/testing-library__jest-dom@5.14.9: + resolution: {integrity: sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==} dependencies: '@types/jest': 29.5.3 dev: true @@ -2535,7 +2574,7 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.5.1 + '@eslint-community/regexpp': 4.6.2 '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 5.59.2 '@typescript-eslint/type-utils': 5.59.2(eslint@8.40.0)(typescript@5.0.4) @@ -2651,7 +2690,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.59.2 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /@vitejs/plugin-react-swc@3.3.2(vite@4.3.9): @@ -2659,7 +2698,7 @@ packages: peerDependencies: vite: ^4 dependencies: - '@swc/core': 1.3.70 + '@swc/core': 1.3.75 vite: 4.3.9(@types/node@20.0.0) transitivePeerDependencies: - '@swc/helpers' @@ -2671,9 +2710,9 @@ packages: peerDependencies: vite: ^4.2.0 dependencies: - '@babel/core': 7.22.9 - '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.9) - '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.10) react-refresh: 0.14.0 vite: 4.3.9(@types/node@20.0.0) transitivePeerDependencies: @@ -2688,10 +2727,10 @@ packages: '@ampproject/remapping': 2.2.1 '@bcoe/v8-coverage': 0.2.3 istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - magic-string: 0.30.1 + istanbul-reports: 3.1.6 + magic-string: 0.30.2 picocolors: 1.0.0 std-env: 3.3.3 test-exclude: 6.0.0 @@ -2718,9 +2757,9 @@ packages: /@vitest/snapshot@0.33.0: resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==} dependencies: - magic-string: 0.30.1 + magic-string: 0.30.2 pathe: 1.1.1 - pretty-format: 29.6.1 + pretty-format: 29.6.2 /@vitest/spy@0.33.0: resolution: {integrity: sha512-Kv+yZ4hnH1WdiAkPUQTpRxW8kGtH8VRTnus7ZTGovFYM1ZezJpvGtb9nPIjPnptHbsyIAxYZsEpVPYgtpjGnrg==} @@ -2732,7 +2771,7 @@ packages: dependencies: diff-sequences: 29.4.3 loupe: 2.3.6 - pretty-format: 29.6.1 + pretty-format: 29.6.2 /abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} @@ -2845,43 +2884,43 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 cosmiconfig: 7.1.0 - resolve: 1.22.2 + resolve: 1.22.4 dev: false - /babel-plugin-polyfill-corejs2@0.4.4(@babel/core@7.22.9): - resolution: {integrity: sha512-9WeK9snM1BfxB38goUEv2FLnA6ja07UMfazFHzCXUb3NyDZAwfXvQiURQ6guTTMeHcOsdknULm1PDhs4uWtKyA==} + /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.10): + resolution: {integrity: sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.1(@babel/core@7.22.9) - '@nicolo-ribaudo/semver-v6': 6.3.3 + '@babel/core': 7.22.10 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.10) + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.8.2(@babel/core@7.22.9): - resolution: {integrity: sha512-Cid+Jv1BrY9ReW9lIfNlNpsI53N+FN7gE+f73zLAUbr9C52W4gKLWSByx47pfDJsEysojKArqOtOKZSVIIUTuQ==} + /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.10): + resolution: {integrity: sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.1(@babel/core@7.22.9) - core-js-compat: 3.31.1 + '@babel/core': 7.22.10 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.10) + core-js-compat: 3.32.0 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.1(@babel/core@7.22.9): - resolution: {integrity: sha512-L8OyySuI6OSQ5hFy9O+7zFjyr4WhAfRjLIOkhQGYl+emwJkd/S4XXT1JpfrgR1jrQ1NcGiOh+yAdGlF8pnC3Jw==} + /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.10): + resolution: {integrity: sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.9 - '@babel/helper-define-polyfill-provider': 0.4.1(@babel/core@7.22.9) + '@babel/core': 7.22.10 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.10) transitivePeerDependencies: - supports-color dev: true @@ -2908,15 +2947,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.21.9: - resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001517 - electron-to-chromium: 1.4.467 + caniuse-lite: 1.0.30001519 + electron-to-chromium: 1.4.490 node-releases: 2.0.13 - update-browserslist-db: 1.0.11(browserslist@4.21.9) + update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true /cac@6.7.14: @@ -2934,8 +2973,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - /caniuse-lite@1.0.30001517: - resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==} + /caniuse-lite@1.0.30001519: + resolution: {integrity: sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==} dev: true /ccount@2.0.1: @@ -3007,6 +3046,11 @@ packages: engines: {node: '>=6'} dev: false + /clsx@2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + dev: false + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -3047,14 +3091,14 @@ packages: /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - /core-js-compat@3.31.1: - resolution: {integrity: sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA==} + /core-js-compat@3.32.0: + resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==} dependencies: - browserslist: 4.21.9 + browserslist: 4.21.10 dev: true - /core-js@3.31.1: - resolution: {integrity: sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==} + /core-js@3.32.0: + resolution: {integrity: sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==} requiresBuild: true dev: false @@ -3211,7 +3255,7 @@ packages: /dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 csstype: 3.1.2 dev: false @@ -3236,8 +3280,8 @@ packages: - encoding dev: false - /electron-to-chromium@1.4.467: - resolution: {integrity: sha512-2qI70O+rR4poYeF2grcuS/bCps5KJh6y1jtZMDDEteyKJQrzLOEhFyXCLcHW6DTBjKjWkk26JhWoAi+Ux9A0fg==} + /electron-to-chromium@1.4.490: + resolution: {integrity: sha512-6s7NVJz+sATdYnIwhdshx/N/9O6rvMxmhVoDSDFdj6iA45gHR8EQje70+RYsF4GeB+k0IeNSBnP7yG9ZXJFr7A==} dev: true /engine.io-client@6.4.0: @@ -3343,16 +3387,16 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope@7.2.1: - resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: true - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + /eslint-visitor-keys@3.4.2: + resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -3362,8 +3406,8 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.1 '@eslint/js': 8.40.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 @@ -3374,8 +3418,8 @@ packages: 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 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -3390,7 +3434,7 @@ packages: imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.4.1 + js-sdsl: 4.4.2 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -3411,7 +3455,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /esquery@1.5.0: @@ -3443,16 +3487,16 @@ packages: engines: {node: '>=0.10.0'} dev: true - /expect@29.6.1: - resolution: {integrity: sha512-XEdDLonERCU1n9uR56/Stx9OqojaLAQtZf9PrCHH9Hl8YXiEIka3H4NXJ3NOIBmQJTg7+j7buh34PMHfJujc8g==} + /expect@29.6.2: + resolution: {integrity: sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.6.1 + '@jest/expect-utils': 29.6.2 '@types/node': 20.0.0 jest-get-type: 29.4.3 - jest-matcher-utils: 29.6.1 - jest-message-util: 29.6.1 - jest-util: 29.6.1 + jest-matcher-utils: 29.6.2 + jest-message-util: 29.6.2 + jest-util: 29.6.2 dev: true /extend@3.0.2: @@ -3463,8 +3507,8 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-glob@3.3.0: - resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3501,7 +3545,7 @@ packages: /fbjs@2.0.0: resolution: {integrity: sha512-8XA8ny9ifxrAWlyhAbexXcs3rRMtxWcs3M0lctLfB49jRDHiaxj+Mo0XxbwE7nKZYzgCFoq64FS+WFd4IycPPQ==} dependencies: - core-js: 3.31.1 + core-js: 3.32.0 cross-fetch: 3.1.8 fbjs-css-vars: 1.0.2 loose-envify: 1.4.0 @@ -3524,7 +3568,7 @@ packages: resolution: {integrity: sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==} engines: {node: '>= 12'} dependencies: - tslib: 2.6.0 + tslib: 2.6.1 dev: false /fill-range@7.0.1: @@ -3670,7 +3714,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -3920,8 +3964,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 @@ -4044,12 +4088,12 @@ packages: engines: {node: '>=8'} dev: true - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} dependencies: istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 + make-dir: 4.0.0 supports-color: 7.2.0 dev: true @@ -4064,22 +4108,26 @@ packages: - supports-color dev: true - /istanbul-reports@3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 dev: true - /jest-diff@29.6.1: - resolution: {integrity: sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==} + /javascript-natural-sort@0.7.1: + resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} + dev: true + + /jest-diff@29.6.2: + resolution: {integrity: sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 diff-sequences: 29.4.3 jest-get-type: 29.4.3 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true /jest-get-type@29.4.3: @@ -4087,33 +4135,33 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-matcher-utils@29.6.1: - resolution: {integrity: sha512-SLaztw9d2mfQQKHmJXKM0HCbl2PPVld/t9Xa6P9sgiExijviSp7TnZZpw2Fpt+OI3nwUO/slJbOfzfUMKKC5QA==} + /jest-matcher-utils@29.6.2: + resolution: {integrity: sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.6.1 + jest-diff: 29.6.2 jest-get-type: 29.4.3 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true - /jest-message-util@29.6.1: - resolution: {integrity: sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==} + /jest-message-util@29.6.2: + resolution: {integrity: sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.6.1 + pretty-format: 29.6.2 slash: 3.0.0 stack-utils: 2.0.6 dev: true - /jest-util@29.6.1: - resolution: {integrity: sha512-NRFCcjc+/uO3ijUVyNOQJluf8PtGCe/W6cix36+M3cTFgiYqFOOW5MgN4JOOcvbUhcKTYVd1CvHz/LWi8d16Mg==} + /jest-util@29.6.2: + resolution: {integrity: sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 @@ -4124,8 +4172,8 @@ packages: picomatch: 2.3.1 dev: true - /js-sdsl@4.4.1: - resolution: {integrity: sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==} + /js-sdsl@4.4.2: + resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} dev: true /js-tokens@4.0.0: @@ -4290,17 +4338,17 @@ packages: hasBin: true dev: true - /magic-string@0.30.1: - resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} + /magic-string@0.30.2: + resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: - semver: 6.3.1 + semver: 7.5.4 dev: true /markdown-table@3.0.3: @@ -4729,7 +4777,7 @@ packages: acorn: 8.10.0 pathe: 1.1.1 pkg-types: 1.0.3 - ufo: 1.1.2 + ufo: 1.2.0 /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -4885,7 +4933,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -4939,8 +4987,8 @@ packages: mlly: 1.4.0 pathe: 1.1.1 - /postcss@8.4.26: - resolution: {integrity: sha512-jrXHFF8iTloAenySjM/ob3gSj7pCu0Ji49hnjqzsgSRa50hkWCKD0HQ+gMNJkW38jBI68MpAAg7ZWwHwX8NMMw==} + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -4967,8 +5015,8 @@ packages: react-is: 17.0.2 dev: true - /pretty-format@29.6.1: - resolution: {integrity: sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==} + /pretty-format@29.6.2: + resolution: {integrity: sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/schemas': 29.6.0 @@ -5118,7 +5166,7 @@ packages: remark-parse: 10.0.2 remark-rehype: 10.1.0 space-separated-tokens: 2.0.2 - style-to-object: 0.4.1 + style-to-object: 0.4.2 unified: 10.1.2 unist-util-visit: 4.1.2 vfile: 5.3.7 @@ -5176,7 +5224,7 @@ packages: peerDependencies: react: '>= 0.14.0' dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 highlight.js: 10.7.3 lowlight: 1.20.0 prismjs: 1.29.0 @@ -5190,7 +5238,7 @@ packages: react: '>=16.6.0' react-dom: '>=16.6.0' dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -5226,7 +5274,7 @@ packages: react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 memoize-one: 5.2.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -5282,13 +5330,13 @@ packages: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - /regenerator-transform@0.15.1: - resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} + /regenerator-transform@0.15.2: + resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.10 dev: true /regexp.prototype.flags@1.5.0: @@ -5356,11 +5404,11 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -5376,8 +5424,8 @@ packages: glob: 7.2.3 dev: true - /rollup@3.26.3: - resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} + /rollup@3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -5489,7 +5537,6 @@ packages: /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} - dev: false /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} @@ -5543,13 +5590,13 @@ packages: engines: {node: '>=8'} dev: true - /strip-literal@1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: acorn: 8.10.0 - /style-to-object@0.4.1: - resolution: {integrity: sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==} + /style-to-object@0.4.2: + resolution: {integrity: sha512-1JGpfPB3lo42ZX8cuPrheZbfQ6kqPPnPHlKMyeRYtfKD+0jG+QsXgXN57O/dvJlzlB2elI6dGmrPnl5VPQFPaA==} dependencies: inline-style-parser: 0.1.1 dev: false @@ -5668,8 +5715,8 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - /tslib@2.6.0: - resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.1: + resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} dev: false /tsutils@3.21.0(typescript@5.0.4): @@ -5713,8 +5760,8 @@ packages: resolution: {integrity: sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==} dev: false - /ufo@1.1.2: - resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} + /ufo@1.2.0: + resolution: {integrity: sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg==} /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -5792,13 +5839,13 @@ packages: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} - /update-browserslist-db@1.0.11(browserslist@4.21.9): + /update-browserslist-db@1.0.11(browserslist@4.21.10): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.9 + browserslist: 4.21.10 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -5846,7 +5893,7 @@ packages: resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 dev: true @@ -5931,8 +5978,8 @@ packages: dependencies: '@types/node': 20.0.0 esbuild: 0.17.19 - postcss: 8.4.26 - rollup: 3.26.3 + postcss: 8.4.27 + rollup: 3.28.0 optionalDependencies: fsevents: 2.3.2 @@ -5982,11 +6029,11 @@ packages: debug: 4.3.4 jsdom: 22.1.0 local-pkg: 0.4.3 - magic-string: 0.30.1 + magic-string: 0.30.2 pathe: 1.1.1 picocolors: 1.0.0 std-env: 3.3.3 - strip-literal: 1.0.1 + strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.6.0 vite: 4.3.9(@types/node@20.0.0) diff --git a/src/chainlit/frontend/src/App.tsx b/src/chainlit/frontend/src/App.tsx index 96e72117ea..703f240c3c 100644 --- a/src/chainlit/frontend/src/App.tsx +++ b/src/chainlit/frontend/src/App.tsx @@ -74,6 +74,7 @@ function App() { toastOptions={{ className: 'toast', style: { + maxWidth: 500, fontFamily: 'Inter', background: theme.palette.background.paper, border: `1px solid ${theme.palette.divider}`, diff --git a/src/chainlit/frontend/src/api/index.ts b/src/chainlit/frontend/src/api/index.ts index 2e49becd85..a7213e762d 100644 --- a/src/chainlit/frontend/src/api/index.ts +++ b/src/chainlit/frontend/src/api/index.ts @@ -1,6 +1,6 @@ import { IPageInfo, IPagination } from 'components/organisms/dataset/table'; -import { IChat, ILLMSettings } from 'state/chat'; +import { IChat, IPrompt } from 'state/chat'; import { IDatasetFilters } from 'state/dataset'; import { IMessageElement } from 'state/element'; import { IMember, Role } from 'state/user'; @@ -12,6 +12,23 @@ const serverUrl = new URL(url); const httpEndpoint = `${serverUrl.protocol}//${serverUrl.host}`; export const wsEndpoint = httpEndpoint; +export class ClientError extends Error { + detail?: string; + + constructor(message: string, detail?: string) { + super(message); + this.detail = detail; + } + + toString() { + if (this.detail) { + return `${this.message}: ${this.detail}`; + } else { + return this.message; + } + } +} + export class ChainlitClient { public headers: Headers; @@ -36,30 +53,69 @@ export class ChainlitClient { return res.json(); }; - fetch = async (resource: string, options: object) => { + fetch = async (resource: string, options: RequestInit) => { const res = await fetch(`${httpEndpoint}${resource}`, { ...options, headers: this.headers }); if (!res.ok) { - throw new Error(res.statusText); + let err: ClientError; + try { + const body = await res.json(); + err = new ClientError(res.statusText, body.detail); + } catch (_) { + err = new ClientError(res.statusText); + } + throw err; } return res; }; getCompletion = async ( - prompt: string, - settings: ILLMSettings, - userEnv = {} + prompt: IPrompt, + userEnv = {}, + controller: AbortController, + tokenCb: (done: boolean, token: string) => void ) => { - const res = await this.fetch(`/completion`, { + const response = await this.fetch(`/completion`, { method: 'POST', - body: JSON.stringify({ prompt, settings, userEnv }) + signal: controller.signal, + body: JSON.stringify({ + prompt: prompt, + userEnv + }) + }); + + const reader = response.body?.getReader(); + + const stream = new ReadableStream({ + start(controller) { + function push() { + reader! + .read() + .then(({ done, value }) => { + if (done) { + controller.close(); + tokenCb(done, ''); + return; + } + const string = new TextDecoder('utf-8').decode(value); + tokenCb(done, string); + controller.enqueue(value); + push(); + }) + .catch((err) => { + controller.close(); + tokenCb(true, ''); + console.error(err); + }); + } + push(); + } }); - const completion = await res.text(); - return completion; + return stream; }; getRole = async () => { @@ -131,4 +187,15 @@ export class ChainlitClient { return res.json(); }; + + getLLMProviders = async () => { + const res = await this.fetch(`/project/llm-providers`, { + headers: { + 'content-type': 'application/json' + }, + method: 'GET' + }); + + return res.json(); + }; } diff --git a/src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx b/src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx new file mode 100644 index 0000000000..94f14c1717 --- /dev/null +++ b/src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx @@ -0,0 +1,56 @@ +import { grey } from 'palette'; +import { useCopyToClipboard, useToggle } from 'usehooks-ts'; + +import { CopyAll } from '@mui/icons-material'; +import { IconButton, Tooltip } from '@mui/material'; + +import useIsDarkMode from 'hooks/useIsDarkMode'; + +interface ClipboardCopyProps { + value: string; + theme?: 'dark' | 'light'; +} + +const ClipboardCopy = ({ value, theme }: ClipboardCopyProps): JSX.Element => { + const [showTooltip, toggleTooltip] = useToggle(); + const isDarkMode = useIsDarkMode(); + const [_, copy] = useCopyToClipboard(); + + const getColor = () => { + if (theme) { + if (theme === 'dark') return grey[200]; + else if (theme === 'light') return grey[800]; + } + + return isDarkMode ? grey[200] : grey[800]; + }; + + return ( + + { + copy(value) + .then(() => toggleTooltip()) + .catch((err) => + console.log('An error occurred while copying: ', err) + ); + }} + > + + + + ); +}; + +export default ClipboardCopy; diff --git a/src/chainlit/frontend/src/components/atoms/Code.tsx b/src/chainlit/frontend/src/components/atoms/Code.tsx index 45987af5ad..082a090c54 100644 --- a/src/chainlit/frontend/src/components/atoms/Code.tsx +++ b/src/chainlit/frontend/src/components/atoms/Code.tsx @@ -2,17 +2,15 @@ import { grey } from 'palette'; import { CodeProps } from 'react-markdown/lib/ast-to-react'; import { PrismAsync as SyntaxHighlighter } from 'react-syntax-highlighter'; import { dracula } from 'react-syntax-highlighter/dist/esm/styles/prism'; -import { useCopyToClipboard, useToggle } from 'usehooks-ts'; -import { CopyAll } from '@mui/icons-material'; -import { Box, IconButton, Tooltip } from '@mui/material'; +import { Box } from '@mui/material'; import useIsDarkMode from 'hooks/useIsDarkMode'; +import ClipboardCopy from './ClipboardCopy'; + export default function Code({ inline, children, ...props }: CodeProps) { - const [showTooltip, toggleTooltip] = useToggle(); const isDarkMode = useIsDarkMode(); - const [value, copy] = useCopyToClipboard(); const match = /language-(\w+)/.exec(props.className || ''); const showSyntaxHighlighter = !inline && match; @@ -71,34 +69,11 @@ export default function Code({ inline, children, ...props }: CodeProps) { return ( {!inline ? ( - - { - copy(children[0] as string) - .then(() => { - toggleTooltip(); - console.log('Successfully copied: ', value); - }) - .catch((err) => - console.log('An error occurred while copying: ', err) - ); - }} - > - - - + ) : null} {renderCode()} diff --git a/src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx b/src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx index 9fcf49f22a..4fefa5e5c6 100644 --- a/src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx +++ b/src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx @@ -1,7 +1,10 @@ import { useTheme } from '@mui/material'; import Button, { ButtonProps } from '@mui/material/Button'; -export default function AccentButton({ children, ...props }: ButtonProps) { +export default function AccentButton({ + children, + ...props +}: ButtonProps & { target?: string }) { const theme = useTheme(); return ( diff --git a/src/chainlit/frontend/src/components/atoms/element/sideView.tsx b/src/chainlit/frontend/src/components/atoms/element/sideView.tsx index f84be1e3e3..8e9c6e1aa5 100644 --- a/src/chainlit/frontend/src/components/atoms/element/sideView.tsx +++ b/src/chainlit/frontend/src/components/atoms/element/sideView.tsx @@ -166,9 +166,8 @@ const SideView = ({ children }: SideViewProps) => { const MainDrawer = styled(Box, { shouldForwardProp: (prop) => prop !== 'open' -})(({ theme, open, width = DRAWER_DEFAULT_WIDTH }) => ({ +})(({ theme, open }) => ({ width: '100%', - marginRight: !open && theme.breakpoints.up('sm') ? -width : 0, display: 'flex', flexDirection: 'column', boxSizing: 'border-box', diff --git a/src/chainlit/frontend/src/components/atoms/element/video.tsx b/src/chainlit/frontend/src/components/atoms/element/video.tsx index b4125ae417..afcbb0e587 100644 --- a/src/chainlit/frontend/src/components/atoms/element/video.tsx +++ b/src/chainlit/frontend/src/components/atoms/element/video.tsx @@ -9,6 +9,8 @@ export default function VideoElement({ element }: Props) { return null; } const className = `${element.display}-video`; - const src = element.url || URL.createObjectURL(new Blob([element.content!])); + const src = + element.url || + URL.createObjectURL(new Blob([element.content!], { type: 'video/mp4' })); return ; } diff --git a/src/chainlit/frontend/src/components/atoms/errorBoundary.tsx b/src/chainlit/frontend/src/components/atoms/errorBoundary.tsx index 19f2fdc146..a9e366b848 100644 --- a/src/chainlit/frontend/src/components/atoms/errorBoundary.tsx +++ b/src/chainlit/frontend/src/components/atoms/errorBoundary.tsx @@ -3,21 +3,24 @@ import { Component, ErrorInfo, ReactNode } from 'react'; import { Alert, Box } from '@mui/material'; interface Props { + prefix?: string; children?: ReactNode; } interface State { hasError: boolean; + error?: string; } class ErrorBoundary extends Component { public state: State = { - hasError: false + hasError: false, + error: undefined }; - public static getDerivedStateFromError(_: Error): State { + public static getDerivedStateFromError(err: Error): State { // Update state so the next render will show the fallback UI. - return { hasError: true }; + return { hasError: true, error: err.message }; } public componentDidCatch(error: Error, errorInfo: ErrorInfo) { @@ -26,9 +29,12 @@ class ErrorBoundary extends Component { public render() { if (this.state.hasError) { + const msg = this.props.prefix + ? `${this.props.prefix}: ${this.state.error}` + : this.state.error; return ( - Something went wrong. + {msg} ); } diff --git a/src/chainlit/frontend/src/components/atoms/notificationCount.tsx b/src/chainlit/frontend/src/components/atoms/notificationCount.tsx index efa692f126..9451050214 100644 --- a/src/chainlit/frontend/src/components/atoms/notificationCount.tsx +++ b/src/chainlit/frontend/src/components/atoms/notificationCount.tsx @@ -1,13 +1,25 @@ -import { Box, Typography, useTheme } from '@mui/material'; +import { Box, TextField, Theme, Typography, useTheme } from '@mui/material'; + +export type NotificationCountProps = { + count?: number | string; + inputProps?: { + id: string; + max?: number; + min?: number; + onChange: (event: any) => void; + step?: number; + }; +}; export default function NotificationCount({ - notificationsCount -}: { - notificationsCount: number | string; -}): JSX.Element { + count, + inputProps +}: NotificationCountProps): JSX.Element | null { const theme = useTheme(); - return ( + if (!count) return null; + + const renderBox = () => ( - {notificationsCount} + {count} ); + + const renderInput = () => { + const getInputWidth = (hasArrow?: boolean) => { + const contentWidth = count.toString().length * 8 + (hasArrow ? 18 : 0); + return `${contentWidth}px`; + }; + + return inputProps ? ( + theme.spacing(0.5, 1), + fontSize: '12px', + fontWeight: 600, + color: 'text.secondary', + '&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': { + display: 'none' + }, + '&:focus': { + width: getInputWidth(true), + '&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': { + display: 'flex' + } + } + } + }} + sx={{ + borderRadius: '6px', + backgroundColor: (theme: Theme) => + theme.palette.mode === 'light' ? 'grey.100' : 'grey.800', + '& fieldset': { border: 'none' } + }} + value={count} + onChange={inputProps.onChange} + /> + ) : null; + }; + + return !inputProps ? renderBox() : renderInput(); } diff --git a/src/chainlit/frontend/src/components/atoms/toggle.tsx b/src/chainlit/frontend/src/components/atoms/toggle.tsx new file mode 100644 index 0000000000..e4841bbd5b --- /dev/null +++ b/src/chainlit/frontend/src/components/atoms/toggle.tsx @@ -0,0 +1,83 @@ +import { grey, primary } from 'palette'; +import React from 'react'; + +import { Box } from '@mui/material'; +import { Tab, Tabs } from '@mui/material'; + +import InputStateHandler from 'components/organisms/inputs/inputStateHandler'; + +import useIsDarkMode from 'hooks/useIsDarkMode'; + +import { IInput } from 'types/Input'; + +interface ToggleProps extends IInput { + items: string[]; + onChange: (newValue: string) => void; + value: string; +} + +const Toggle = (props: ToggleProps): JSX.Element => { + const { id, items, label, onChange, value } = props; + + const isDarkMode = useIsDarkMode(); + + return ( + + `1px solid ${theme.palette.divider}`, + backgroundColor: (theme) => theme.palette.background.paper, + borderRadius: 1, + padding: 0.5 + }} + > + item === value)} + onChange={(event: React.SyntheticEvent, newValue: number) => + onChange(items[newValue]) + } + sx={{ + minHeight: '40px !important', + + '& .MuiButtonBase-root': { + textTransform: 'none', + zIndex: 1, + color: grey[isDarkMode ? 600 : 500], + fontSize: '14px', + fontWeight: 500, + padding: 0, + minHeight: '40px !important', + width: '125px' + }, + '& .Mui-selected': { + color: 'white !important' + }, + '& .MuiTabs-indicator': { + background: (theme) => + isDarkMode ? theme.palette.divider : primary[600], + height: '100%', + borderRadius: '5px' + } + }} + > + {items.map((item) => ( + + ))} + + + + ); +}; + +export default Toggle; diff --git a/src/chainlit/frontend/src/components/molecules/inputLabel.tsx b/src/chainlit/frontend/src/components/molecules/inputLabel.tsx index c43b1650a1..dbd8df93fa 100644 --- a/src/chainlit/frontend/src/components/molecules/inputLabel.tsx +++ b/src/chainlit/frontend/src/components/molecules/inputLabel.tsx @@ -1,20 +1,22 @@ import { Info } from '@mui/icons-material'; import { Box, InputLabel, Tooltip } from '@mui/material'; -import NotificationCount from 'components/atoms/notificationCount'; +import NotificationCount, { + NotificationCountProps +} from 'components/atoms/notificationCount'; type InputLabelProps = { id?: string; label: string | number; tooltip?: string; - notificationsCount?: number | string; + notificationsProps?: NotificationCountProps; }; export default function inputLabel({ id, label, tooltip, - notificationsCount + notificationsProps }: InputLabelProps): JSX.Element { return ( @@ -35,8 +37,8 @@ export default function inputLabel({ ) : null} - {notificationsCount ? ( - + {notificationsProps ? ( + ) : null} ); diff --git a/src/chainlit/frontend/src/components/organisms/FormInput.tsx b/src/chainlit/frontend/src/components/organisms/FormInput.tsx index 27dcb23c19..4dd4710d70 100644 --- a/src/chainlit/frontend/src/components/organisms/FormInput.tsx +++ b/src/chainlit/frontend/src/components/organisms/FormInput.tsx @@ -1,3 +1,5 @@ +import omit from 'lodash/omit'; + import Switch, { SwitchProps } from 'components/atoms/switch'; import { IInput } from 'types/Input'; @@ -12,6 +14,7 @@ export type TFormInputValue = string | number | boolean | string[] | undefined; export interface IFormInput extends IInput { type: T; value?: V; + initial?: V; setField?(field: string, value: V, shouldValidate?: boolean): void; } @@ -25,7 +28,13 @@ export type TFormInput = const FormInput = ({ element }: { element: TFormInput }): JSX.Element => { switch (element.type) { case 'select': - return ; + // We omit the 'setField' prop to avoid React warnings and ensure it's available for . + return ( + + ); case 'slider': return ; case 'tags': @@ -33,7 +42,7 @@ const FormInput = ({ element }: { element: TFormInput }): JSX.Element => { case 'switch': return ( { /> ); case 'textinput': - return ; + return ( + + ); default: - // Unimplemented element type if this errors + // If the element type is not recognized, we indicate an unimplemented type. + // This code path should not normally occur and serves as a fallback. element satisfies never; return <>; } diff --git a/src/chainlit/frontend/src/components/organisms/chat/index.tsx b/src/chainlit/frontend/src/components/organisms/chat/index.tsx index efec791c9b..97972bbae8 100644 --- a/src/chainlit/frontend/src/components/organisms/chat/index.tsx +++ b/src/chainlit/frontend/src/components/organisms/chat/index.tsx @@ -21,7 +21,7 @@ import { chatHistoryState } from 'state/chatHistory'; import { elementState, tasklistState } from 'state/element'; import { projectSettingsState } from 'state/project'; -import Playground from '../playground'; +import PromptPlayground from '../playground'; import InputBox from './inputBox'; import MessageContainer from './message/container'; import ChatSettingsModal from './settings'; @@ -37,7 +37,6 @@ const Chat = () => { const actions = useRecoilValue(actionState); const pSettings = useRecoilValue(projectSettingsState); const setChatHistory = useSetRecoilState(chatHistoryState); - const [autoScroll, setAutoScroll] = useState(true); const onSubmit = useCallback( @@ -103,7 +102,7 @@ const Chat = () => { return ( - + @@ -114,8 +113,8 @@ const Chat = () => { Could not reach the server. )} - {!!messages.length && ( - + + {!!messages.length && ( { autoScroll={autoScroll} setAutoScroll={setAutoScroll} /> - - )} - {!messages.length && } - + )} + {!messages.length && } + + ); diff --git a/src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx b/src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx index aef5b89319..c4892c09e6 100644 --- a/src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx +++ b/src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx @@ -32,11 +32,11 @@ function getLineCount(el: HTMLDivElement) { const Input = ({ onSubmit, onReply }: Props) => { const ref = useRef(null); + const setChatHistory = useSetRecoilState(chatHistoryState); const [chatSettings, setChatSettings] = useRecoilState(chatSettingsState); const loading = useRecoilValue(loadingState); const askUser = useRecoilValue(askUserState); const session = useRecoilValue(sessionState); - const setChatHistory = useSetRecoilState(chatHistoryState); const [value, setValue] = useState(''); const [isComposing, setIsComposing] = useState(false); diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx b/src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx index 9813c309bb..feba4d697f 100644 --- a/src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx +++ b/src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx @@ -1,6 +1,6 @@ import { useRecoilValue, useSetRecoilState } from 'recoil'; -import EditIcon from '@mui/icons-material/EditOutlined'; +import BugReportIcon from '@mui/icons-material/BugReport'; import { IconButton, Stack, Tooltip } from '@mui/material'; import ActionList from 'components/atoms/actionsList'; @@ -31,20 +31,20 @@ export default function Buttons({ message, actions }: Props) { const showEditButton = !!message.prompt && !!message.content; const editButton = showEditButton ? ( - + { if (!message.prompt) return; - setPlayground({ - llmSettings: message.llmSettings, + setPlayground((old) => ({ + ...old, prompt: message.prompt, - completion: message.content! - }); + originalPrompt: message.prompt + })); }} > - + ) : null; diff --git a/src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx b/src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx index fb31c47cad..c19f309af5 100644 --- a/src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx +++ b/src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx @@ -1,3 +1,4 @@ +import { ClientError } from 'api'; import { useState } from 'react'; import toast from 'react-hot-toast'; import { useRecoilValue } from 'recoil'; @@ -39,7 +40,7 @@ export default function DeleteConversationButton({ loading: 'Deleting conversation...', success: 'Conversation deleted!', error: (err) => { - if (err instanceof Error) { + if (err instanceof ClientError) { return {err.message}; } else { return ; diff --git a/src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx b/src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx index dc792094e5..579f4f9ad0 100644 --- a/src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx +++ b/src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx @@ -1,4 +1,4 @@ -import { Box, FormControl, FormHelperText } from '@mui/material'; +import { FormControl, FormHelperText, Stack, SxProps } from '@mui/material'; import InputLabel from 'components/molecules/inputLabel'; @@ -6,6 +6,7 @@ import { IInput } from 'types/Input'; export type InputStateHandlerProps = { children: React.ReactNode; + sx?: SxProps; } & IInput; export default function InputStateHandler( @@ -17,24 +18,25 @@ export default function InputStateHandler( hasError, id, label, - notificationsCount, - tooltip + notificationsProps, + tooltip, + sx } = props; return ( - + {label ? ( ) : null} {children} {description ? {description} : null} - + ); } diff --git a/src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx b/src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx index 61154172cc..e2b4f1d2ca 100644 --- a/src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx +++ b/src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx @@ -3,8 +3,8 @@ import { grey } from 'palette'; import React from 'react'; import { KeyboardArrowDown } from '@mui/icons-material'; -import { MenuItem } from '@mui/material'; -import MSelect, { SelectChangeEvent } from '@mui/material/Select'; +import { MenuItem, SxProps } from '@mui/material'; +import MSelect, { SelectChangeEvent, SelectProps } from '@mui/material/Select'; import NotificationCount from 'components/atoms/notificationCount'; @@ -20,14 +20,17 @@ export type SelectItem = { value: string | number; }; -export type SelectInputProps = { - children?: React.ReactNode; - items?: SelectItem[]; - name?: string; - onChange: (e: SelectChangeEvent) => void; - renderLabel?: () => string; - value?: string | number; -} & IInput; +export type SelectInputProps = IInput & + Omit, 'value' | 'onChange'> & { + children?: React.ReactNode; + items?: SelectItem[]; + name?: string; + onChange: (e: SelectChangeEvent) => void; + placeholder?: string; + renderLabel?: () => string; + value?: string | number; + iconSx?: SxProps; + }; type MenuItemProps = { index: number; @@ -63,7 +66,7 @@ export const renderMenuItem = ({ > {item.label || item.value} {item.notificationCount ? ( - + ) : null} ); @@ -81,7 +84,11 @@ export default function SelectInput({ size = 'small', tooltip, value, - renderLabel + placeholder = 'Select', + renderLabel, + sx, + iconSx, + ...rest }: SelectInputProps): JSX.Element { const isDarkMode = useIsDarkMode(); @@ -92,39 +99,61 @@ export default function SelectInput({ description={description} label={label} tooltip={tooltip} + sx={sx} > - (renderLabel && renderLabel()) || - `${items?.find((item) => item.value === value)?.label}` - } + displayEmpty + renderValue={() => { + if (!value || value === '') return placeholder; + + return ( + (renderLabel && renderLabel()) || + `${items?.find((item) => item.value === value)?.label}` + ); + }} sx={{ - backgroundColor: isDarkMode ? grey[900] : '', - my: 0.5, - boxShadow: - '0px 10px 10px 0px rgba(0, 0, 0, 0.05), 0px 2px 4px 0px rgba(0, 0, 0, 0.05)' + backgroundColor: (theme) => theme.palette.background.paper, + borderRadius: 1, + padding: 0.5, + '&.MuiOutlinedInput-root': { + '& fieldset': { + border: (theme) => `1px solid ${theme.palette.divider}` + } + } }} inputProps={{ id: id, name: name || id, sx: { + color: grey[600], + fontSize: '14px', + fontWeight: 400, px: '16px', - py: size === 'small' ? '10px' : '14px' - }, - MenuProps: { + py: size === 'small' ? '10px' : '14px', + h: '48px' + } + }} + MenuProps={{ + PaperProps: { sx: { + border: (theme: any) => `1px solid ${theme.palette.divider}`, + boxShadow: (theme: any) => + theme.palette.mode === 'light' + ? '0px 2px 4px 0px #0000000D' + : '0px 10px 10px 0px #0000000D', '&& .Mui-selected, .Mui-selected.Mui-selected:hover': { backgroundColor: isDarkMode ? grey[800] : primary[50] } - }, - MenuListProps: { - sx: { backgroundColor: isDarkMode ? grey[900] : '' } } + }, + MenuListProps: { + sx: { backgroundColor: isDarkMode ? grey[900] : '' } } }} IconComponent={(props) => ( @@ -135,7 +164,8 @@ export default function SelectInput({ px: '9px', color: !disabled ? `${isDarkMode ? grey[300] : grey[600]} !important` - : '' + : '', + ...iconSx }} /> )} diff --git a/src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx b/src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx index 8b16809f30..91911114eb 100644 --- a/src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx +++ b/src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx @@ -31,6 +31,7 @@ export default function TagsInput({ > setField?.(id, value, false)} inputProps={{ diff --git a/src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx b/src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx new file mode 100644 index 0000000000..ce355823ec --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx @@ -0,0 +1,20 @@ +import { PropsWithChildren } from 'react'; + +import { Stack } from '@mui/material'; + +export default function ActionBar({ children }: PropsWithChildren) { + return ( + theme.palette.background.paper, + padding: '16px 24px', + alignItems: 'center', + justifyContent: 'flex-end', + gap: 2 + }} + > + {children} + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/basic.tsx b/src/chainlit/frontend/src/components/organisms/playground/basic.tsx new file mode 100644 index 0000000000..4990cc8965 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/basic.tsx @@ -0,0 +1,104 @@ +import { EditorState } from 'draft-js'; +import { useRecoilValue, useSetRecoilState } from 'recoil'; + +import { Alert, Stack } from '@mui/material'; + +import { IPrompt } from 'state/chat'; +import { modeState, playgroundState } from 'state/playground'; + +import Completion from './editor/completion'; +import FormattedEditor from './editor/formatted'; +import TemplateEditor from './editor/template'; + +interface Props { + prompt: IPrompt; + hasTemplate: boolean; + restoredTime: number; +} + +export default function BasicPromptPlayground({ + hasTemplate, + prompt, + restoredTime +}: Props) { + const mode = useRecoilValue(modeState); + const setPlayground = useSetRecoilState(playgroundState); + + if (prompt.messages) { + return null; + } + + const onTemplateChange = (nextState: EditorState) => { + const template = nextState.getCurrentContent().getPlainText(); + setPlayground((old) => ({ + ...old, + prompt: { + ...old.prompt!, + template + } + })); + }; + + const onFormattedChange = (nextState: EditorState) => { + const formatted = nextState.getCurrentContent().getPlainText(); + setPlayground((old) => ({ + ...old, + prompt: { + ...old.prompt!, + formatted + } + })); + }; + + const renderTemplate = () => { + return ( + + ); + }; + + const renderFormatted = () => { + if (hasTemplate) { + return ( + + ); + } else if (typeof prompt.formatted === 'string') { + return ( + + ); + } else { + return ( + + Neither template or formatted prompt provided. + + ); + } + }; + + return ( + + {mode === 'Template' ? renderTemplate() : null} + {mode === 'Formatted' ? renderFormatted() : null} + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/chat.tsx b/src/chainlit/frontend/src/components/organisms/playground/chat.tsx new file mode 100644 index 0000000000..a09f290417 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/chat.tsx @@ -0,0 +1,108 @@ +import { EditorState } from 'draft-js'; +import { Fragment } from 'react'; +import { useRecoilValue, useSetRecoilState } from 'recoil'; + +import { Box, Stack, Typography } from '@mui/material'; +import { grey } from '@mui/material/colors'; + +import { IPrompt } from 'state/chat'; +import { modeState, playgroundState } from 'state/playground'; + +import Completion from './editor/completion'; +import PromptMessage from './editor/promptMessage'; + +interface Props { + prompt: IPrompt; + hasTemplate: boolean; + restoredTime: number; +} + +export default function ChatPromptPlayground({ + hasTemplate, + prompt, + restoredTime +}: Props) { + const setPlayground = useSetRecoilState(playgroundState); + const mode = useRecoilValue(modeState); + + const messages = prompt.messages; + + if (!messages) { + return null; + } + + const onChange = (index: number, nextState: EditorState) => { + const text = nextState.getCurrentContent().getPlainText(); + const key = hasTemplate ? 'template' : 'formatted'; + + setPlayground((old) => ({ + ...old, + prompt: { + ...old.prompt!, + messages: old.prompt?.messages?.map((message, mIndex) => { + if (mIndex === index) { + return { + ...message, + [key]: text + }; + } + return message; + }) + } + })); + }; + + const title = + mode === 'Formatted' + ? hasTemplate + ? 'Formatted messages [Read Only]' + : 'Formatted messages' + : 'Prompt messages'; + + return ( + + + {title} + + + {messages.length > 0 ? ( + + {messages.map((message, index) => ( + + + {index !== messages.length - 1 ? ( + `1px solid ${theme.palette.divider}`, + borderRadius: 1 + }} + /> + ) : null} + + ))} + + ) : null} + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx new file mode 100644 index 0000000000..f7c11107e7 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx @@ -0,0 +1,116 @@ +import { Editor, EditorState, Modifier, SelectionState } from 'draft-js'; +import { OrderedSet } from 'immutable'; +import { useEffect, useState } from 'react'; + +import ExpandLessIcon from '@mui/icons-material/ExpandLess'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { Box, IconButton, Stack, Typography } from '@mui/material'; +import { grey } from '@mui/material/colors'; + +import EditorWrapper from 'components/organisms/playground/editor/wrapper'; + +import 'draft-js/dist/Draft.css'; + +const styleMap = { + COMPLETION: { + backgroundColor: '#d2f4d3', + color: 'black', + borderRadius: '2px' + } +}; + +interface Props { + completion?: string; +} + +export default function Completion({ completion }: Props) { + const [state, setState] = useState(EditorState.createEmpty()); + const [isCompletionOpen, setCompletionOpen] = useState(true); + + useEffect(() => { + let _state = EditorState.createEmpty(); + if (completion) { + _state = insertCompletion(_state, completion); + } + + setState(_state); + setCompletionOpen(true); + }, [completion]); + + const insertCompletion = (state: EditorState, completion: string) => { + const contentState = state.getCurrentContent(); + + const blockMap = contentState.getBlockMap(); + const key = blockMap.last().getKey(); + const length = blockMap.last().getLength(); + const selection = new SelectionState({ + anchorKey: key, + anchorOffset: length, + focusKey: key, + focusOffset: length + }); + + const ncs = Modifier.insertText( + contentState, + selection, + completion, + OrderedSet.of('COMPLETION') + ); + const es = EditorState.push(state, ncs, 'insert-characters'); + return EditorState.forceSelection(es, ncs.getSelectionAfter()); + }; + + return ( + + + + Completion + + setCompletionOpen(!isCompletionOpen)}> + {isCompletionOpen ? : } + + + `1px solid ${theme.palette.divider}`, + borderRadius: 1, + marginTop: 1 + }} + /> + + + { + // Read only mode, force content but preserve selection + nextState = EditorState.push( + nextState, + state.getCurrentContent(), + 'insert-characters' + ); + setState(nextState); + }} + /> + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx new file mode 100644 index 0000000000..844d581a31 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx @@ -0,0 +1,397 @@ +import { + ContentState, + Editor, + EditorState, + Modifier, + SelectionState +} from 'draft-js'; +import { useColors } from 'helpers/color'; +import { + buildEscapeReplaceRegexp, + buildTemplatePlaceholderRegexp, + escape, + validateVariablePlaceholder +} from 'helpers/format'; +import { OrderedSet } from 'immutable'; +import { isEqual } from 'lodash'; +import merge from 'lodash/merge'; +import { useRef, useState } from 'react'; +import { toast } from 'react-hot-toast'; +import { useSetRecoilState } from 'recoil'; +import { useIsFirstRender } from 'usehooks-ts'; + +import EditorWrapper from 'components/organisms/playground/editor/wrapper'; + +import { IPrompt } from 'state/chat'; +import { modeState, variableState } from 'state/playground'; + +import 'draft-js/dist/Draft.css'; + +export interface IVariable { + name: string; + styleIndex: number; + content?: string; +} + +interface Props { + template?: string; + formatted?: string; + prompt: IPrompt; + readOnly?: boolean; + onChange?: (state: EditorState) => void; + showTitle?: boolean; + sxEditorChildren?: any; +} + +function useCustomStyleMap() { + const colors = useColors(true); + + const customStyleMap: Record> = {}; + + for (let i = 0; i < colors.length; i++) { + customStyleMap[i.toString()] = { + background: colors[i], + borderRadius: '2px', + cursor: 'pointer' + }; + } + + return customStyleMap; +} + +/* This function takes a draftjs block content and matches all escaping and interpolation + * candidates using a regexp specific to the current template format. f-string example: + * "Hello this is a {{{{variable}}}}" would match "{{{{variable}}}}". + */ +function matchToEscapeOrReplace(text: string, format: string) { + const regexp = buildEscapeReplaceRegexp(format); + const matches: RegExpExecArray[] = []; + let match: RegExpExecArray | null; + + while ((match = regexp.exec(text)) !== null) { + if (match.index > -1) { + matches.push(match); + } + } + + return matches; +} + +// This function takes a text and tries to match a variable placeholder to replace +function matchVariable(text: string, variableName: string, format: string) { + // Get the regex based on the current template format + const regex = buildTemplatePlaceholderRegexp(variableName, format); + const match = regex.exec(text); + const matchedVariable = match?.[0]; + if (matchedVariable) { + // We found a variable candidate for instance {{{{variable}}}}". + // We now need to validate that we need to replace it. + const { ok } = validateVariablePlaceholder( + variableName, + matchedVariable, + format + ); + return { match: matchedVariable, ok }; + } else { + return { match: '', ok: false }; + } +} + +function formatTemplate( + state: EditorState, + variables: IVariable[], + format: string +) { + let contentState = state.getCurrentContent(); + let nextState = state; + + // Iterate each block in the editor. + // At this point the editor content is still the template + contentState.getBlockMap().forEach((contentBlock) => { + if (!contentBlock) { + return; + } + + const key = contentBlock.getKey(); + const text = contentBlock.getText(); + + // Get the substrings of the block to escape/replace + const ssmToEscapeOrReplace = matchToEscapeOrReplace(text, format); + + // We start with escaping + + // Each escaping will change the block text length. + // We need to keep track of the length diff (offset) to keep the escaping accurate. + let escapeOffset = 0; + + const ssmToEscapeOrReplaceWithVariable = ssmToEscapeOrReplace.map((ssm) => { + const ss = ssm[0]; + + let variableFound = undefined; + // Iterate each variable and try to match it. + // If there is a match, flag it for replacement later on and break. + for (const variable of variables) { + const { match, ok } = matchVariable(ss, variable.name, format); + if (ok) { + variableFound = { variable, match }; + break; + } + } + + // start index of the selection to escape, accounting for offset + const startIndex = ssm.index + escapeOffset; + // end index of the selection to scape, accounting for offset + const endIndex = startIndex + ss.length; + + // Define the selection of the template to escape + const selectionToEscape = new SelectionState({ + anchorKey: key, + anchorOffset: startIndex, + focusKey: key, + focusOffset: endIndex + }); + + // Escape the substring + const content = escape(ss, format); + + // Update the offset (new value length - old value length) + escapeOffset += content.length - ss.length; + + // Perform the replace operation + contentState = Modifier.replaceText( + contentState, + selectionToEscape, + content + ); + nextState = EditorState.push(state, contentState, 'apply-entity'); + + // Update the substring match since we just updated it + ssm[0] = content; + ssm.index = startIndex; + + return { ssm, variableFound }; + }); + + // At this point the template has been escaped + // We now perform replace operations + + // Each replace will change the block text length. + // We need to keep track of the length diff (offset) to keep the replace accurate. + let replaceOffset = 0; + + ssmToEscapeOrReplaceWithVariable.forEach(({ ssm, variableFound }) => { + if (!variableFound) { + // Nothing to replace + return; + } + + const { variable } = variableFound; + + const ss = ssm[0]; + + // It is important to preserve the selection to keep the text selectable (copy paste for instance) + const currentSelection = nextState.getSelection(); + + // We know the variable is here but we need to know the exact range to replace + // for instance {{{var1}}} was escaped to {{var1}} so we need to replace {var1} + const { localEndIndex, localStartIndex } = validateVariablePlaceholder( + variable.name, + ss, + format + ); + + // The start of the range is the + // start index of the whole variable + the local start index + // of the exact variable match + the offset + const startIndex = ssm.index + localStartIndex + replaceOffset; + + // Same for the end index + const endIndex = ssm.index + localEndIndex + replaceOffset; + + // Define the selection to replace + const selectionToHighlight = new SelectionState({ + anchorKey: key, + anchorOffset: startIndex, + focusKey: key, + focusOffset: endIndex + }); + + const content = variable.content || ''; + + // Update the offset + replaceOffset += content.length - (localEndIndex - localStartIndex); + + // Perform the replace operation + contentState = nextState.getCurrentContent(); + contentState = contentState.createEntity('TOKEN', 'SEGMENTED', variable); + const entityKey = contentState.getLastCreatedEntityKey(); + contentState = Modifier.replaceText( + contentState, + selectionToHighlight, + content, + OrderedSet.of(variable.styleIndex.toString()), + entityKey + ); + nextState = EditorState.push(nextState, contentState, 'apply-entity'); + nextState = EditorState.forceSelection(nextState, currentSelection); + }); + }); + + return nextState; +} + +function getEntityAtSelection(editorState: EditorState) { + const selectionState = editorState.getSelection(); + const selectionKey = selectionState.getStartKey(); + const contentstate = editorState.getCurrentContent(); + + // The block in which the selection starts + const block = contentstate.getBlockForKey(selectionKey); + + if (!block) { + return; + } + + // Entity key at the start selection + const entityKey = block.getEntityAt(selectionState.getStartOffset()); + if (entityKey) { + // The actual entity instance + const entityInstance = contentstate.getEntity(entityKey); + const entityInfo = { + type: entityInstance.getType(), + mutability: entityInstance.getMutability(), + data: entityInstance.getData() + }; + return entityInfo; + } +} + +export default function FormattedEditor({ + template, + formatted, + prompt, + readOnly, + onChange, + showTitle = false, + sxEditorChildren +}: Props) { + const editorRef = useRef(null); + const setVariable = useSetRecoilState(variableState); + const setPromptMode = useSetRecoilState(modeState); + + const [state, setState] = useState(); + const [prevInputs, setPrevInputs] = useState>(); + + const customStyleMap = useCustomStyleMap(); + const isFirstRender = useIsFirstRender(); + + if (isFirstRender || !isEqual(prompt.inputs, prevInputs)) { + if (typeof template === 'string') { + const inputs = prompt.inputs || {}; + + const variableNames = Object.keys(inputs); + const variables: IVariable[] = []; + + for (let i = 0; i < variableNames.length; i++) { + const variableName = variableNames[i]; + + const variableContent = inputs[variableName]; + + variables.push({ + name: variableName, + styleIndex: i, + content: variableContent + }); + } + + const sortedVariables = variables.sort( + (a, b) => b.name.length - a.name.length + ); + + const state = EditorState.createWithContent( + ContentState.createFromText(template) + ); + const nextState = formatTemplate( + state, + sortedVariables, + prompt.template_format + ); + + setState(nextState); + } else if (typeof formatted === 'string') { + const nextState = EditorState.createWithContent( + ContentState.createFromText(formatted) + ); + setState(nextState); + } + setPrevInputs(prompt.inputs); + } + + const handleOnEditorChange = (nextState: EditorState) => { + const hasFocus = nextState.getSelection().getHasFocus(); + + const entity = getEntityAtSelection(nextState); + if (entity && hasFocus && editorRef.current) { + // Open the variable modal + setVariable(entity.data.name); + + // If we do not blur the selection stay the same + // And we keep opening the variable + editorRef.current.blur(); + } + + if (!readOnly) { + // update editor + onChange && onChange(nextState); + } else if (state) { + const currentContent = state.getCurrentContent(); + const nextContent = nextState.getCurrentContent(); + + if (currentContent !== nextContent) { + toast.error( + 'Formatted prompt is read only. Edit the template/variables instead.' + ); + setPromptMode('Template'); + } + + // Read only mode, force content but preserve selection + nextState = EditorState.push( + nextState, + currentContent, + 'insert-characters' + ); + } + setState(nextState); + }; + + if (!state) { + return null; + } + + const title = readOnly ? 'Formatted prompt [Read Only]' : 'Formatted prompt'; + + return ( + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx new file mode 100644 index 0000000000..d5e0e014b3 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx @@ -0,0 +1,170 @@ +import { EditorState } from 'draft-js'; +import { useSetRecoilState } from 'recoil'; +import { useToggle } from 'usehooks-ts'; + +import { Alert, Box, Stack, Typography, useTheme } from '@mui/material'; +import { SelectChangeEvent } from '@mui/material/Select'; + +import SelectInput from 'components/organisms/inputs/selectInput'; + +import { IPrompt, IPromptMessage, PromptMessageRole } from 'state/chat'; +import { PromptMode, playgroundState } from 'state/playground'; + +import FormattedEditor from './formatted'; +import TemplateEditor from './template'; + +const roles = ['Assistant', 'System', 'User']; + +interface Props { + message: IPromptMessage; + prompt: IPrompt; + mode: PromptMode; + index: number; + onChange: (index: number, nextState: EditorState) => void; +} + +export default function PromptMessage({ + message, + prompt, + mode, + index, + onChange +}: Props) { + const setPlayground = useSetRecoilState(playgroundState); + const [isSelectRoleOpen, toggleSelectRole] = useToggle(); + const theme = useTheme(); + + const templateProps = { + prompt, + sxEditorChildren: { + padding: theme.spacing(2), + backgroundColor: '', + '&:hover': { + background: theme.palette.background.paper + } + } + }; + + const renderTemplate = () => { + return ( + onChange(index, state)} + /> + ); + }; + + const renderFormatted = () => { + if (typeof message.template === 'string') { + return ( + + ); + } else if (typeof message.formatted === 'string') { + return ( + onChange(index, state)} + formatted={message.formatted} + readOnly={false} + showTitle={false} + /> + ); + } + + return ( + + Neither template or formatted prompt provided. + + ); + }; + + const onRoleSelected = (event: SelectChangeEvent) => { + const role = event.target.value as PromptMessageRole; + + if (role) { + setPlayground((old) => ({ + ...old, + prompt: { + ...old.prompt!, + messages: old.prompt?.messages?.map((message, mIndex) => ({ + ...message, + ...(mIndex === index ? { role } : {}) // Update role if it's the selected message + })) + } + })); + } + + toggleSelectRole(); + }; + + return ( + theme.spacing(1, 2), + paddingRight: 0, + '&:hover': { + background: (theme) => theme.palette.background.paper + } + }} + > + + {isSelectRoleOpen ? ( + ({ + label: role, + value: role.toLowerCase() + }))} + id="role-select" + value={message.role} + onChange={onRoleSelected} + iconSx={{ + px: 0, + marginRight: '2px !important' + }} + /> + ) : ( + theme.spacing(0.5, 1), + '&:hover': { + backgroundColor: (theme) => theme.palette.divider + } + }} + > + {message?.role?.toUpperCase()} + + )} + + + + {mode === 'Template' ? renderTemplate() : null} + {mode === 'Formatted' ? renderFormatted() : null} + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx new file mode 100644 index 0000000000..d1e102b6a5 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx @@ -0,0 +1,105 @@ +import { + CompositeDecorator, + ContentBlock, + ContentState, + DraftDecorator, + Editor, + EditorState +} from 'draft-js'; +import { + buildTemplatePlaceholdersRegexp, + validateVariablePlaceholder +} from 'helpers/format'; +import { useState } from 'react'; +import { useIsFirstRender } from 'usehooks-ts'; + +import EditorWrapper from 'components/organisms/playground/editor/wrapper'; + +import { IPrompt } from 'state/chat'; + +import Variable from './variable'; + +const findVariable = ( + regex: RegExp, + format: string, + contentBlock: ContentBlock, + callback: (start: number, end: number) => void +) => { + const text = contentBlock.getText(); + let matchArr: RegExpExecArray | null; + while ((matchArr = regex.exec(text)) !== null) { + const { ok, localEndIndex, localStartIndex } = validateVariablePlaceholder( + matchArr[1], + matchArr[0], + format + ); + if (!ok) { + continue; + } + const start = matchArr.index + localStartIndex; + const end = matchArr.index + localEndIndex; + callback(start, end); + } +}; + +interface Props { + prompt: IPrompt; + template: string; + onChange(nextState: EditorState): void; + showTitle?: boolean; + sxEditorChildren?: any; +} + +export default function TemplateEditor({ + prompt, + template, + onChange, + showTitle = true, + sxEditorChildren +}: Props) { + const [state, setState] = useState(); + const isFirstRender = useIsFirstRender(); + + if (isFirstRender) { + const contentState = ContentState.createFromText(template); + + const variableDecorator: DraftDecorator = { + strategy: (contentBlock, callback) => { + findVariable( + buildTemplatePlaceholdersRegexp( + prompt.inputs, + prompt.template_format + ), + prompt.template_format, + contentBlock, + callback + ); + }, + component: Variable + }; + + const decorators = new CompositeDecorator([variableDecorator]); + setState(EditorState.createWithContent(contentState, decorators)); + } + + if (!state) { + return null; + } + + return ( + + { + setState(nextState); + onChange && onChange(nextState); + }} + /> + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx new file mode 100644 index 0000000000..5e3c69526d --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx @@ -0,0 +1,69 @@ +import { useColors } from 'helpers/color'; +import { buildVariablePlaceholder } from 'helpers/format'; +import React, { useEffect, useState } from 'react'; +import { useRecoilValue, useSetRecoilState } from 'recoil'; + +import { Tooltip } from '@mui/material'; + +import { playgroundState, variableState } from 'state/playground'; + +interface Props { + decoratedText: string; +} + +function truncate(str: string, n = 200) { + return str.length > n ? str.slice(0, n - 1) + '...' : str; +} + +export default function Variable({ + children, + decoratedText +}: React.PropsWithChildren) { + const setVariableName = useSetRecoilState(variableState); + const playground = useRecoilValue(playgroundState); + const colors = useColors(true); + const [variableIndex, setVariableIndex] = useState(); + const [styles, setStyles] = useState({}); + + const prompt = playground?.prompt; + + if (!prompt) { + return null; + } + + useEffect(() => { + if (prompt.inputs && decoratedText) { + const index = Object.keys(prompt.inputs).findIndex( + (name) => + buildVariablePlaceholder(name, prompt.template_format) === + decoratedText + ); + if (index > -1) { + setVariableIndex(index); + const colorIndex = index % (colors.length - 1); + setStyles({ + backgroundColor: colors[colorIndex], + borderRadius: '2px', + cursor: 'pointer' + }); + } + } + }, [decoratedText, prompt]); + + const [varName, varValue] = + variableIndex !== undefined + ? Object.entries(prompt.inputs || {})[variableIndex] + : []; + + return ( + + setVariableName(varName)} + > + {children} + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx new file mode 100644 index 0000000000..9ddcafdab8 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx @@ -0,0 +1,121 @@ +import { ContentState, Editor, EditorState } from 'draft-js'; +import { useEffect, useState } from 'react'; +import { useRecoilState } from 'recoil'; + +import { + Alert, + Box, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Typography, + useTheme +} from '@mui/material'; +import { grey } from '@mui/material/colors'; + +import AccentButton from 'components/atoms/buttons/accentButton'; + +import { playgroundState, variableState } from 'state/playground'; + +import EditorWrapper from './wrapper'; + +const VariableModal = (): JSX.Element | null => { + const [state, setState] = useState(); + const [playground, setPlayground] = useRecoilState(playgroundState); + const [variableName, setVariableName] = useRecoilState(variableState); + const theme = useTheme(); + + useEffect(() => { + if (variableName && playground.prompt?.inputs) { + setState( + EditorState.createWithContent( + ContentState.createFromText(playground.prompt.inputs[variableName]) + ) + ); + } + }, [variableName]); + + const updateVariable = () => { + if (variableName) { + setPlayground((old) => { + if (!old?.prompt) return old; + + return { + ...old, + prompt: { + ...old.prompt, + inputs: { + ...old?.prompt?.inputs, + [variableName]: state?.getCurrentContent().getPlainText() || '' + } + } + }; + }); + setVariableName(undefined); + } + }; + + const resetVariableName = () => { + setVariableName(undefined); + }; + + if (!variableName) return null; + + return ( + + theme.palette.mode === 'dark' ? `1px solid ${grey[800]}` : null, + borderRadius: 1 + }} + > + + + + {`Edit ${variableName}`} + + + + + Editing a variable will update its value in the formatted view. If + you want to update the template instead, go to the template view. + + {state ? ( + + ({ + color: theme.palette.text.primary, + padding: '2px' + })} + editorState={state} + onChange={(nextState) => { + nextState && setState(nextState); + }} + /> + + ) : null} + + + + Save + + + + + ); +}; + +export default VariableModal; diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/wrapper.tsx b/src/chainlit/frontend/src/components/organisms/playground/editor/wrapper.tsx new file mode 100644 index 0000000000..81e058d8f3 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/editor/wrapper.tsx @@ -0,0 +1,70 @@ +import merge from 'lodash/merge'; +import { grey } from 'palette'; +import React from 'react'; + +import { + Box, + Stack, + SxProps, + Theme, + Typography, + useTheme +} from '@mui/material'; + +import ClipboardCopy from 'components/atoms/ClipboardCopy'; + +interface Props { + className?: string; + clipboardValue?: string; + sx?: SxProps; + sxChildren?: SxProps; + title?: string; +} + +export default function EditorWrapper({ + children, + className, + clipboardValue, + sx, + sxChildren, + title +}: React.PropsWithChildren) { + const theme = useTheme(); + + return ( + + + {title} + + + {clipboardValue ? : null} + {children} + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/header.tsx b/src/chainlit/frontend/src/components/organisms/playground/header.tsx new file mode 100644 index 0000000000..e7baae0b95 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/header.tsx @@ -0,0 +1,58 @@ +import { grey } from 'palette'; + +import CloseIcon from '@mui/icons-material/Close'; +import TuneIcon from '@mui/icons-material/Tune'; +import { IconButton, Stack } from '@mui/material'; + +import AccentButton from 'components/atoms/buttons/accentButton'; + +import PromptModeToggle from './modeToggle'; +import SaveButton from './saveButton'; +import VariableInput from './variableInput'; + +interface Props { + hasTemplate?: boolean; + isSmallScreen?: boolean; + toggleDrawer: () => void; + handleClose: () => void; +} + +export default function PlaygroundHeader({ + hasTemplate, + isSmallScreen, + toggleDrawer, + handleClose +}: Props) { + return ( + + + + + + + + Help + + + + {isSmallScreen ? ( + + + + ) : null} + + + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/helpers.tsx b/src/chainlit/frontend/src/components/organisms/playground/helpers.tsx new file mode 100644 index 0000000000..416887b82d --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/helpers.tsx @@ -0,0 +1,38 @@ +import { ILLMProvider, IPlayground } from 'state/playground'; + +const getProviders = (playground: IPlayground) => { + const providers = playground?.providers || []; + + if (!providers?.length) { + throw new Error('No LLM provider available'); + } + + let provider = providers.find( + (provider) => provider.id === playground.prompt?.provider + ); + + const providerFound = !!provider; + + provider = provider || providers[0]; + + return { + provider, + providerFound, + providers + }; +}; + +const getDefaultSettings = (providerId: string, providers?: ILLMProvider[]) => { + if (!providers || providers.length === 0) return {}; + + const defaultSettings: { [key: string]: any } = {}; + const provider = providers?.find((provider) => provider.id === providerId); + + provider?.inputs?.forEach( + (input) => (defaultSettings[input.id] = input.initial) + ); + + return defaultSettings; +}; + +export { getDefaultSettings, getProviders }; diff --git a/src/chainlit/frontend/src/components/organisms/playground/index.tsx b/src/chainlit/frontend/src/components/organisms/playground/index.tsx index 18e0394733..72623b87e5 100644 --- a/src/chainlit/frontend/src/components/organisms/playground/index.tsx +++ b/src/chainlit/frontend/src/components/organisms/playground/index.tsx @@ -1,131 +1,86 @@ -import { - ContentState, - Editor, - EditorState, - Modifier, - SelectionState -} from 'draft-js'; -import { OrderedSet } from 'immutable'; -import { useEffect, useState } from 'react'; -import { toast } from 'react-hot-toast'; -import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { useToggle } from 'usehooks-ts'; +import { useState } from 'react'; +import { useRecoilState, useRecoilValue } from 'recoil'; +import { useIsFirstRender, useToggle } from 'usehooks-ts'; -import ChevronRightIcon from '@mui/icons-material/ChevronRight'; -import CloseIcon from '@mui/icons-material/Close'; -import HelpIcon from '@mui/icons-material/HelpOutline'; import RestoreIcon from '@mui/icons-material/Restore'; -import SettingsIcon from '@mui/icons-material/Settings'; -import LoadingButton from '@mui/lab/LoadingButton'; import { - Box, - Drawer, + Alert, IconButton, Stack, + Theme, Tooltip, - Typography + useMediaQuery, + useTheme } from '@mui/material'; import Dialog from '@mui/material/Dialog'; import DialogContent from '@mui/material/DialogContent'; import DialogTitle from '@mui/material/DialogTitle'; -import { clientState } from 'state/client'; -import { playgroundSettingsState, playgroundState } from 'state/playground'; -import { userEnvState } from 'state/user'; +import ErrorBoundary from 'components/atoms/errorBoundary'; -import 'draft-js/dist/Draft.css'; +import { clientState } from 'state/client'; +import { playgroundState } from 'state/playground'; +import ActionBar from './actionBar'; +import BasicPromptPlayground from './basic'; +import ChatPromptPlayground from './chat'; +import VariableModal from './editor/variableModal'; +import PlaygroundHeader from './header'; import ModelSettings from './modelSettings'; +import SubmitButton from './submitButton'; -const styleMap = { - COMPLETION: { - backgroundColor: '#d2f4d3', - color: 'black' - } -}; - -export default function Playground() { +export default function PromptPlayground() { const client = useRecoilValue(clientState); - const playground = useRecoilValue(playgroundState); - const setPlayground = useSetRecoilState(playgroundState); - const settings = useRecoilValue(playgroundSettingsState); - const userEnv = useRecoilValue(userEnvState); - const setPlaygroundSettings = useSetRecoilState(playgroundSettingsState); + const [playground, setPlayground] = useRecoilState(playgroundState); - const [state, setState] = useState(EditorState.createEmpty()); - const [loading, setLoading] = useState(false); + const [restoredTime, setRestoredTime] = useState(0); + const [providersError, setProvidersError] = useState(); const [isDrawerOpen, toggleDrawer] = useToggle(false); - useEffect(() => { - if (playground?.prompt) { - const _state = EditorState.createWithContent( - ContentState.createFromText(playground.prompt) - ); - setState(insertCompletion(_state, playground.completion)); - } - if (playground?.llmSettings) { - setPlaygroundSettings({ ...playground.llmSettings }); - } - }, [playground]); + const isFirstRender = useIsFirstRender(); + const theme = useTheme(); + const isSmallScreen = useMediaQuery((theme) => + theme.breakpoints.down('md') + ); + + if (isFirstRender) { + client + .getLLMProviders() + .then((res) => + setPlayground((old) => ({ ...old, providers: res.providers })) + ) + .catch((err) => setProvidersError(err)); + } const restore = () => { if (playground) { - setPlayground({ ...playground }); + setPlayground((old) => ({ + ...old, + prompt: old.originalPrompt + })); + setRestoredTime((old) => old + 1); } }; - const insertCompletion = (state: EditorState, completion: string) => { - const contentState = state.getCurrentContent(); - - const blockMap = contentState.getBlockMap(); - const key = blockMap.last().getKey(); - const length = blockMap.last().getLength(); - const selection = new SelectionState({ - anchorKey: key, - anchorOffset: length, - focusKey: key, - focusOffset: length - }); - - const ncs = Modifier.insertText( - contentState, - selection, - '\n' + completion, - OrderedSet.of('COMPLETION') - ); - const es = EditorState.push(state, ncs, 'insert-characters'); - return EditorState.forceSelection(es, ncs.getSelectionAfter()); - }; - const handleClose = () => { - setPlayground(undefined); + setPlayground((old) => ({ ...old, prompt: undefined })); }; - const submit = async () => { - if (!settings) { - return; - } - const prompt = state.getCurrentContent().getPlainText(); - try { - setLoading(true); - const completion = await client.getCompletion(prompt, settings, userEnv); - setState(insertCompletion(state, completion)); - } catch (err) { - if (err instanceof Error) { - toast.error(err.message); - } - } finally { - setLoading(false); - } - }; + if (!playground?.prompt) { + return null; + } + + const hasTemplate = playground?.prompt?.messages + ? playground.prompt.messages.every((m) => typeof m.template === 'string') + : typeof playground?.prompt?.template === 'string'; return ( - - - Prompt playground - - - - - - - - - - - - - - + + - - - `1px solid ${theme.palette.divider}`, - borderRadius: '0.375rem', - overflowY: 'auto', - width: '100%', - flexGrow: 1, - caretColor: (theme) => theme.palette.text.primary, - height: '80vh' - }} - > - - - - + + + {providersError ? ( + + An error occurred while fetching providers settings + + ) : null} + - - - - - - - - - - Submit - - - - - - - + + + + + + + + + + + + + + + + ); } diff --git a/src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx b/src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx new file mode 100644 index 0000000000..1f436a18df --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx @@ -0,0 +1,33 @@ +import { useRecoilState } from 'recoil'; + +import { Alert } from '@mui/material'; + +import Toggle from 'components/atoms/toggle'; + +import { PromptMode, modeState } from 'state/playground'; + +interface Props { + hasTemplate?: boolean; +} +export default function PromptModeToggle({ hasTemplate }: Props) { + const [mode, setMode] = useRecoilState(modeState); + + if (mode === 'Template' && !hasTemplate) { + setMode('Formatted'); + return null; + } + + return hasTemplate ? ( + setMode(v as PromptMode)} + /> + ) : ( + + Prompt template not found. Only displaying formatted prompt instead. + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx b/src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx index 1b00b3021a..59a502cef8 100644 --- a/src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx +++ b/src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx @@ -1,148 +1,250 @@ import { useFormik } from 'formik'; -import { MuiChipsInput } from 'mui-chips-input'; +import cloneDeep from 'lodash/cloneDeep'; +import merge from 'lodash/merge'; import { useEffect } from 'react'; -import { useRecoilState } from 'recoil'; +import { useRecoilState, useRecoilValue } from 'recoil'; import * as yup from 'yup'; -import { Box, Stack } from '@mui/material'; +import ChevronRightIcon from '@mui/icons-material/ChevronRight'; +import { + Alert, + Box, + Drawer, + IconButton, + SelectChangeEvent, + Stack, + Typography +} from '@mui/material'; -import InputLabel from 'components/molecules/inputLabel'; +import SelectInput from 'components/organisms/inputs/selectInput'; import { ILLMSettings } from 'state/chat'; -import { playgroundSettingsState } from 'state/playground'; +import { ILLMProvider, playgroundState } from 'state/playground'; -import SelectCategoryInput from '../inputs/selectCategoryInput'; -import Slider from '../slider'; +import FormInput, { TFormInput, TFormInputValue } from '../FormInput'; +import { getProviders } from './helpers'; -const models = { - GPT4: ['gpt-4'], - 'Chat GPT': ['gpt-3.5-turbo'], - GPT3: ['text-davinci-003', 'text-davinci-002'] +type Schema = { + [key: string]: yup.Schema; }; -const ModelSettings = () => { - const [settings, setSettings] = useRecoilState(playgroundSettingsState); - - const schema = yup.object({ - model_name: yup.string(), - stop: yup.array().of(yup.string()), - temperature: yup.number().min(0).max(1), - top_p: yup.number().min(0).max(1), - frequency_penalty: yup.number().min(0).max(1), - presence_penalty: yup.number().min(0).max(1) - }); +interface IFormProps { + settings: ILLMSettings; + schema: Schema; +} + +const SettingsForm = ({ settings, schema }: IFormProps) => { + const [playground, setPlayground] = useRecoilState(playgroundState); + const { provider, providers, providerFound } = getProviders(playground); + + const providerWarning = !providerFound ? ( + + {playground.prompt?.provider + ? `${playground?.prompt?.provider} provider is not found, using + ${provider.name} instead.` + : `Provider not specified, using ${provider.name} instead.`} + + ) : null; const formik = useFormik({ - initialValues: settings || ({} as ILLMSettings), + initialValues: settings, validationSchema: schema, + enableReinitialize: true, onSubmit: async () => undefined }); useEffect(() => { - if (settings) { - formik.setValues(settings); - } - }, [settings]); - - useEffect(() => { - setSettings(formik.values); + setPlayground((old) => ({ + ...old, + prompt: { + ...old.prompt!, + settings: formik.values + } + })); }, [formik.values]); - const modelSelect = ( - { - const header = category; - const items = models.map((item) => ({ value: item, label: item })); - return { header, items }; - })} - /> - ); - - const temperature = ( - - ); - - const stopSequences = ( - - - { + setPlayground((old) => + merge(cloneDeep(old), { + prompt: { + provider: event.target.value } - onChange={(value) => formik.setFieldValue('stop', value)} - /> + }) + ); + }; + + const buildProviderTooltip = () => { + if (provider.is_chat && !playground.prompt?.messages) { + return `${provider.name} is message-based. This prompt will be wrapped in a message before being sent to ${provider.name}.`; + } else if (!provider.is_chat && playground.prompt?.messages) { + return `${provider.name} is prompt-based. The messages will converted to a single prompt before being sent to ${provider.name}.`; + } else { + return undefined; + } + }; + + return ( + + + Settings + + + ({ + label: provider.name, + value: provider.id + }))} + id="llm-providers" + value={provider.id} + label="LLM Provider" + tooltip={buildProviderTooltip()} + onChange={onSelectedProviderChange} + /> + {providerWarning} + {provider.inputs.map((input: TFormInput, index: number) => ( + + { + formik.handleChange(event); + }, + setField: ( + field: string, + value: TFormInputValue, + shouldValidate?: boolean + ): void => { + formik.setFieldValue(field, value, shouldValidate); + } + }} + /> + + ))} + ); +}; - const topP = ( - - ); +const ModelSettings = () => { + const playground = useRecoilValue(playgroundState); - const frequencyPenalty = ( - - ); + const { provider } = getProviders(playground); + + if (!provider) { + return null; + } - const presencePenalty = ( - + const settings: ILLMSettings = {}; + const currentSettings = playground?.prompt?.settings || {}; + const origSettings = playground?.originalPrompt?.settings || {}; + + const isSettingCompatible = ( + value: string | number | boolean | string[], + input: TFormInput + ) => { + if (input.type === 'select') { + return !!input?.items?.find((i) => i.value === value); + } + return true; + }; + + const schema = yup.object( + provider.inputs.reduce((object: Schema, input: TFormInput) => { + const settingValue = + currentSettings[input.id] !== undefined + ? currentSettings[input.id] + : origSettings[input.id]; + + if ( + settingValue !== undefined && + isSettingCompatible(settingValue, input) + ) { + settings[input.id] = settingValue; + } else if (input.initial !== undefined) { + settings[input.id] = input.initial; + } + + switch (input.type) { + case 'select': + object[input.id] = yup.string(); + break; + case 'slider': { + let schema = yup.number(); + if (input.min) { + schema = schema.min(input.min); + } + if (input.max) { + schema = schema.max(input.max); + } + object[input.id] = schema; + break; + } + case 'tags': + object[input.id] = yup.array().of(yup.string()); + break; + } + + return object; + }, {}) ); return ( - - {modelSelect} - {temperature} - {stopSequences} - {topP} - {frequencyPenalty} - {presencePenalty} - + ); }; -export default ModelSettings; +interface Props { + isSmallScreen: boolean; + isDrawerOpen: boolean; + toggleDrawer: () => void; +} + +export default function ResponsiveModelSettings({ + isSmallScreen, + isDrawerOpen, + toggleDrawer +}: Props) { + return !isSmallScreen ? ( + + + + ) : ( + + + + + + + + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx b/src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx new file mode 100644 index 0000000000..f1ea48e51f --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx @@ -0,0 +1,23 @@ +import { Tooltip } from '@mui/material'; + +import AccentButton from 'components/atoms/buttons/accentButton'; + +interface Props { + hasTemplate?: boolean; +} + +export default function SaveButton({ hasTemplate }: Props) { + if (!hasTemplate) { + return null; + } + + return ( + + + + Save + + + + ); +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx b/src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx new file mode 100644 index 0000000000..74a2c097fc --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx @@ -0,0 +1,89 @@ +import { ClientError } from 'api'; +import { cloneDeep } from 'lodash'; +import { useState } from 'react'; +import { toast } from 'react-hot-toast'; +import { useRecoilState, useRecoilValue } from 'recoil'; + +import AccentButton from 'components/atoms/buttons/accentButton'; +import RegularButton from 'components/atoms/buttons/button'; + +import { clientState } from 'state/client'; +import { playgroundState } from 'state/playground'; +import { userEnvState } from 'state/user'; + +import { getProviders } from './helpers'; + +export default function SubmitButton() { + const [completionController, setCompletionController] = useState< + AbortController | undefined + >(); + const client = useRecoilValue(clientState); + const [playground, setPlayground] = useRecoilState(playgroundState); + + const userEnv = useRecoilValue(userEnvState); + + const submit = async () => { + try { + const { provider } = getProviders(playground); + const prompt = cloneDeep(playground.prompt)!; + prompt.provider = provider.id; + const controller = new AbortController(); + + setCompletionController(controller); + setPlayground((old) => { + if (!old?.prompt) return old; + + return { + ...old, + prompt: { + ...old.prompt!, + completion: '' + } + }; + }); + + await client.getCompletion(prompt, userEnv, controller, (done, token) => { + if (done) { + setCompletionController(undefined); + return; + } + setPlayground((old) => { + if (!old?.prompt) return old; + + return { + ...old, + prompt: { + ...old.prompt!, + completion: (old.prompt?.completion || '') + token + } + }; + }); + }); + } catch (err) { + setCompletionController(undefined); + + if (err instanceof ClientError) { + toast.error(err.toString()); + } + } + }; + + if (completionController) { + return ( + { + completionController.abort(); + setCompletionController(undefined); + }} + > + Cancel + + ); + } else { + return ( + + Submit + + ); + } +} diff --git a/src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx b/src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx new file mode 100644 index 0000000000..7fe85b2c66 --- /dev/null +++ b/src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx @@ -0,0 +1,29 @@ +import map from 'lodash/map'; +import { useRecoilState, useRecoilValue } from 'recoil'; + +import { playgroundState, variableState } from 'state/playground'; + +import SelectInput from '../inputs/selectInput'; + +const VariableInput = (): JSX.Element | null => { + const [variableName, setVariableName] = useRecoilState(variableState); + const playground = useRecoilValue(playgroundState); + + const variables = map(playground?.prompt?.inputs, (input, index) => ({ + label: index, + value: index + })); + + return variables?.length > 0 ? ( + setVariableName(e.target.value)} + sx={{ maxWidth: '270px' }} + /> + ) : null; +}; + +export default VariableInput; diff --git a/src/chainlit/frontend/src/components/organisms/slider.tsx b/src/chainlit/frontend/src/components/organisms/slider.tsx index 13008ba1ee..45db8f4b28 100644 --- a/src/chainlit/frontend/src/components/organisms/slider.tsx +++ b/src/chainlit/frontend/src/components/organisms/slider.tsx @@ -7,7 +7,10 @@ import { IInput } from 'types/Input'; import InputStateHandler from './inputs/inputStateHandler'; -export type SliderProps = IInput & MSliderProps; +export type SliderProps = IInput & + MSliderProps & { + setField?(field: string, value: number, shouldValidate?: boolean): void; + }; const _Slider = ({ description, @@ -15,8 +18,18 @@ const _Slider = ({ id, label, tooltip, + setField, ...sliderProps }: SliderProps) => { + const onChange = (event: any) => { + const parsedValue = parseFloat(event.target.value); + const { min, max, onChange } = sliderProps; + + if (max && parsedValue > max) setField && setField(id, max); + else if (min && parsedValue < min) setField && setField(id, min); + else onChange && onChange(event, parsedValue, 0); + }; + return ( @@ -35,7 +57,8 @@ const StyledSlider = styled(Slider)(({ theme }) => { const isLightMode = theme.palette.mode === 'light'; return { - width: 'calc(100% - 7px)', + width: 'calc(100% - 18px)', + marginLeft: '8px', color: grey[isLightMode ? 300 : 850], height: 3, '& .MuiSlider-track': { diff --git a/src/chainlit/frontend/src/helpers/color.ts b/src/chainlit/frontend/src/helpers/color.ts index e065b4d982..335c1369ad 100644 --- a/src/chainlit/frontend/src/helpers/color.ts +++ b/src/chainlit/frontend/src/helpers/color.ts @@ -38,11 +38,24 @@ function hashCode(str: string) { ); } -export function useColorForName() { - const pSettings = useRecoilValue(projectSettingsState); +export function useColors(inverted?: boolean) { const { theme } = useRecoilValue(settingsState); - const colors = theme === 'dark' ? darkColors : lightColors; + let colors = theme === 'dark' ? darkColors : lightColors; + + if (inverted) { + if (colors === darkColors) { + colors = lightColors; + } else { + colors = darkColors; + } + } + return colors; +} + +export function useColorForName() { + const pSettings = useRecoilValue(projectSettingsState); + const colors = useColors(); return function (name: string, isUser?: boolean, isError?: boolean) { if (isError) { diff --git a/src/chainlit/frontend/src/helpers/format.ts b/src/chainlit/frontend/src/helpers/format.ts new file mode 100644 index 0000000000..37146df20e --- /dev/null +++ b/src/chainlit/frontend/src/helpers/format.ts @@ -0,0 +1,90 @@ +// Helper function to match the placeholders for a given variable in the template +export function buildTemplatePlaceholderRegexp( + variable: string, + format: string +) { + switch (format) { + case 'f-string': { + return new RegExp(`\\{+(${variable}+)\\}+`, 'g'); + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} + +// Helper function to match the placeholders for a all variables in the template +export function buildTemplatePlaceholdersRegexp(inputs = {}, format: string) { + const variables = Object.keys(inputs).sort((a, b) => b.length - a.length); + switch (format) { + case 'f-string': { + // Create a regex pattern from the variables array + const regexPattern = variables.map((v) => `${v}`).join('|'); + return buildTemplatePlaceholderRegexp(regexPattern, format); + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} + +// Helper function to escape the template +export function escape(str: string, format: string) { + switch (format) { + case 'f-string': { + str = str.replaceAll('{{', '{'); + str = str.replaceAll('}}', '}'); + return str; + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} + +// Helper function to match all substrings to escape and or replace +export function buildEscapeReplaceRegexp(format: string) { + switch (format) { + case 'f-string': { + // Match wrapped by {} or opening or closing braces + return /\{+([^{}]+)\}+|{{|}}/g; + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} + +// Helper function to build the template placeholder of a variable +export function buildVariablePlaceholder(variable: string, format: string) { + switch (format) { + case 'f-string': { + return `{${variable}}`; + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} + +export function validateVariablePlaceholder( + variableName: string, + match: string, + format: string +) { + switch (format) { + case 'f-string': { + // leading curly braces + const prefixBracesCount = match.split(variableName)[0].length; + // tailing curly braces + const suffixBracesCount = match.split(variableName)[1].length; + const isOdd = prefixBracesCount % 2; + const ok = isOdd && prefixBracesCount === suffixBracesCount; + const placeholder = buildVariablePlaceholder(variableName, format); + const localStartIndex = match.indexOf(placeholder); + const localEndIndex = localStartIndex + placeholder.length; + return { + ok, + localStartIndex, + localEndIndex + }; + } + default: + throw new Error(`Unsupported template format ${format}`); + } +} diff --git a/src/chainlit/frontend/src/hooks/localChatHistory.ts b/src/chainlit/frontend/src/hooks/localChatHistory.ts new file mode 100644 index 0000000000..187df12c31 --- /dev/null +++ b/src/chainlit/frontend/src/hooks/localChatHistory.ts @@ -0,0 +1,44 @@ +import { useCallback } from 'react'; + +const KEY = 'chatHistory'; +const MAX_SIZE = 50; + +export type MessageHistory = { + messages: { content: string; createdAt: number }[]; +}; + +export default function useLocalChatHistory() { + const getLocalChatHistory = useCallback(() => { + const messageHistory = localStorage.getItem(KEY); + if (messageHistory) { + return JSON.parse(messageHistory) as MessageHistory[]; + } + return []; + }, []); + + const persistChatLocally = useCallback((message: string) => { + const messageHistory: MessageHistory = { + messages: [ + { + content: message, + createdAt: new Date().getTime() + } + ] + }; + + const chatHistory = getLocalChatHistory(); + + if (!chatHistory) { + localStorage.setItem(KEY, JSON.stringify([messageHistory])); + } else { + let curr = [messageHistory, ...chatHistory]; + if (curr.length > MAX_SIZE) { + curr = curr.slice(0, MAX_SIZE); + } + localStorage.setItem(KEY, JSON.stringify(curr)); + } + return []; + }, []); + + return { persistChatLocally, getLocalChatHistory }; +} diff --git a/src/chainlit/frontend/src/pages/Conversation.tsx b/src/chainlit/frontend/src/pages/Conversation.tsx index d96458234e..af65b2ca07 100644 --- a/src/chainlit/frontend/src/pages/Conversation.tsx +++ b/src/chainlit/frontend/src/pages/Conversation.tsx @@ -6,7 +6,7 @@ import { Box } from '@mui/material'; import SideView from 'components/atoms/element/sideView'; import MessageContainer from 'components/organisms/chat/message/container'; -import Playground from 'components/organisms/playground'; +import PromptPlaground from 'components/organisms/playground'; import { IAction } from 'state/action'; import { IChat } from 'state/chat'; @@ -42,7 +42,7 @@ export default function Conversation() { return ( - + diff --git a/src/chainlit/frontend/src/pages/Design.tsx b/src/chainlit/frontend/src/pages/Design.tsx index c87c7fb398..4ad549bc8c 100644 --- a/src/chainlit/frontend/src/pages/Design.tsx +++ b/src/chainlit/frontend/src/pages/Design.tsx @@ -1,10 +1,12 @@ import { green, grey, primary } from 'palette'; +import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useRecoilState } from 'recoil'; import { Typography } from '@mui/material'; import Box from '@mui/material/Box'; +import Toggle from 'components/atoms/toggle'; import InputLabel from 'components/molecules/inputLabel'; import FormInput from 'components/organisms/FormInput'; @@ -16,6 +18,7 @@ export default function Design(): JSX.Element { const navigate = useNavigate(); const [settings, setSettings] = useRecoilState(settingsState); const isDarkMode = useIsDarkMode(); + const [tab, setTab] = useState('Platform'); const voidFunction = (data?: any) => { console.log('Function called. Data: ', data); @@ -122,7 +125,7 @@ export default function Design(): JSX.Element { @@ -173,6 +176,15 @@ export default function Design(): JSX.Element { }} /> + + + + ); diff --git a/src/chainlit/frontend/src/state/chat.ts b/src/chainlit/frontend/src/state/chat.ts index 18c777daa1..3081e450fe 100644 --- a/src/chainlit/frontend/src/state/chat.ts +++ b/src/chainlit/frontend/src/state/chat.ts @@ -1,19 +1,32 @@ import { atom, selector } from 'recoil'; import { Socket } from 'socket.io-client'; -import { TFormInput, TFormInputValue } from 'components/organisms/FormInput'; +import { TFormInput } from 'components/organisms/FormInput'; import { IMessageElement } from './element'; import { IMember } from './user'; -export interface ILLMSettings { - model_name: string; - stop: string[] | string; - temperature: number; - max_tokens: number; - top_p: number; - frequency_penalty: number; - presence_penalty: number; +interface IBaseTemplate { + template?: string; + formatted?: string; + template_format: string; +} + +export type PromptMessageRole = 'system' | 'assistant' | 'user' | 'function'; + +export interface IPromptMessage extends IBaseTemplate { + role: PromptMessageRole; +} + +export type ILLMSettings = Record; + +export interface IPrompt extends IBaseTemplate { + provider: string; + id?: string; + inputs?: Record; + completion?: string; + settings?: ILLMSettings; + messages?: IPromptMessage[]; } export interface IChat { @@ -36,8 +49,7 @@ export interface IMessage { indent?: number; parentId?: string; isError?: boolean; - prompt?: string; - llmSettings?: ILLMSettings; + prompt?: IPrompt; } export interface IMessageUpdate extends IMessage { @@ -131,10 +143,9 @@ export const chatSettingsDefaultValueSelector = selector({ get: ({ get }) => { const chatSettings = get(chatSettingsState); return chatSettings.inputs.reduce( - ( - form: { [key: string]: any }, - input: TFormInput & { initial?: TFormInputValue } - ) => ((form[input.id] = input.initial), form), + (form: { [key: string]: any }, input: TFormInput) => ( + (form[input.id] = input.initial), form + ), {} ); } diff --git a/src/chainlit/frontend/src/state/playground.ts b/src/chainlit/frontend/src/state/playground.ts index 0936f234c9..45e245f675 100644 --- a/src/chainlit/frontend/src/state/playground.ts +++ b/src/chainlit/frontend/src/state/playground.ts @@ -1,19 +1,49 @@ import { atom } from 'recoil'; -import { ILLMSettings } from './chat'; +import { TFormInput } from 'components/organisms/FormInput'; -export interface IPlaygroundState { - llmSettings?: ILLMSettings; - prompt: string; - completion: string; +import { IPrompt } from './chat'; + +export interface ILLMProvider { + id: string; + inputs: TFormInput[]; + name: string; + settings: ILLMSettings; + is_chat: boolean; +} + +export interface ILLMSettings { + settings: { + $schema: string; + $ref: string; + definitions: { + settingsSchema: { + type: string; + Properties: Record; + }; + }; + }; +} + +export interface IPlayground { + providers?: ILLMProvider[]; + prompt?: IPrompt; + originalPrompt?: IPrompt; } -export const playgroundState = atom({ +export const playgroundState = atom({ key: 'Playground', default: undefined }); -export const playgroundSettingsState = atom({ - key: 'PlaygroundSettings', +export const variableState = atom({ + key: 'PlaygroundVariable', default: undefined }); + +export type PromptMode = 'Template' | 'Formatted'; + +export const modeState = atom({ + key: 'PlaygroundMode', + default: 'Template' +}); diff --git a/src/chainlit/frontend/src/theme.ts b/src/chainlit/frontend/src/theme.ts index 1d2cafe9b8..d547315925 100644 --- a/src/chainlit/frontend/src/theme.ts +++ b/src/chainlit/frontend/src/theme.ts @@ -50,6 +50,14 @@ const components = { color: grey[500] } } + }, + MuiTooltip: { + styleOverrides: { + tooltip: { + backgroundColor: 'black', + color: 'white' + } + } } }; @@ -106,7 +114,7 @@ const darkTheme = createTheme({ const lightTheme = createTheme({ typography, - components: components, + components, shape, palette: { mode: 'light', diff --git a/src/chainlit/frontend/src/types/Input.ts b/src/chainlit/frontend/src/types/Input.ts index 6998fc715a..6159d61d65 100644 --- a/src/chainlit/frontend/src/types/Input.ts +++ b/src/chainlit/frontend/src/types/Input.ts @@ -1,3 +1,5 @@ +import { NotificationCountProps } from 'components/atoms/notificationCount'; + interface IInput { className?: string; description?: string; @@ -5,8 +7,9 @@ interface IInput { hasError?: boolean; id: string; label?: string; - notificationsCount?: number | string; + notificationsProps?: NotificationCountProps; size?: 'small' | 'medium'; + sx?: any; tooltip?: string; } diff --git a/src/chainlit/langchain/callbacks.py b/src/chainlit/langchain/callbacks.py index f83b4f5e68..107bc40246 100644 --- a/src/chainlit/langchain/callbacks.py +++ b/src/chainlit/langchain/callbacks.py @@ -6,8 +6,8 @@ from chainlit.config import config from chainlit.context import context from chainlit.message import ErrorMessage, Message +from chainlit.prompt import Prompt, PromptMessage from chainlit.sync import run_sync -from chainlit.types import LLMSettings IGNORE_LIST = ["AgentExecutor"] DEFAULT_ANSWER_PREFIX_TOKENS = ["Final", "Answer", ":"] @@ -15,35 +15,70 @@ def get_llm_settings(invocation_params: Union[Dict, None]): if invocation_params is None: - return None - elif invocation_params["_type"] == "openai": - return LLMSettings( - model_name=invocation_params["model_name"], - stop=invocation_params["stop"], - temperature=invocation_params["temperature"], - max_tokens=invocation_params["max_tokens"], - top_p=invocation_params["top_p"], - frequency_penalty=invocation_params["frequency_penalty"], - presence_penalty=invocation_params["presence_penalty"], - ) - elif invocation_params["_type"] == "openai-chat": - return LLMSettings( - model_name=invocation_params["model_name"], - stop=invocation_params["stop"], + return None, None + + provider = invocation_params.pop("_type") # type: str + + if provider.startswith("openai"): + model_name = invocation_params.pop("model_name") + invocation_params["model"] = model_name + + return provider, invocation_params + + +def build_prompt(serialized: Dict[str, Any], inputs: Dict[str, Any]): + inputs = {k: str(v) for (k, v) in inputs.items()} + prompt_params = serialized.get("kwargs", {}).get("prompt", {}).get("kwargs", {}) + + _messages = prompt_params.get("messages") + + if _messages: + messages = [] + for m in _messages: + m_prompt_params = m.get("kwargs", {}).get("prompt", {}).get("kwargs", {}) + m_template = m_prompt_params.get("template") + m_template_format = m_prompt_params.get("template_format") + messages += [ + PromptMessage( + template=m_template, + template_format=m_template_format, + role=convert_role(m["id"][-1]), + ) + ] + else: + messages = None + + template = prompt_params.get("template") + template_format = prompt_params.get("template_format") + + if template: + return Prompt( + template=template, + template_format=template_format, + inputs=inputs, ) + elif messages: + return Prompt(inputs=inputs, messages=messages) + + +def convert_role(role: str): + if role in ["human", "chat", "HumanMessagePromptTemplate"]: + return "user" + elif role in ["system", "SystemMessagePromptTemplate"]: + return "system" + elif role in ["ai", "AIMessagePromptTemplate"]: + return "assistant" + elif role in ["function", "FunctionMessagePromptTemplate"]: + return "function" else: - return None + raise ValueError(f"Unsupported role {role}") class BaseLangchainCallbackHandler(BaseCallbackHandler): - # Keep track of the formatted prompts to display them in the prompt playground. - prompts: List[str] - # Keep track of the LLM settings for the last prompt - llm_settings: Optional[LLMSettings] + # Keep track of the prompt sequence + prompt_sequence: List[Prompt] # Keep track of the call sequence, like [AgentExecutor, LLMMathChain, Calculator, ...] sequence: List[Message] - # Keep track of the last prompt for each session - last_prompt: Union[str, None] # Keep track of the currently streamed message for the session stream: Union[Message, None] # The stream we can use to stream the final answer from a chain @@ -73,10 +108,8 @@ def __init__( stream_final_answer: bool = False, root_message: Optional[Message] = None, ) -> None: - self.prompts = [] - self.llm_settings = None self.sequence = [] - self.last_prompt = None + self.prompt_sequence = [] self.stream = None if root_message: @@ -109,6 +142,13 @@ def __init__( self.final_stream = None self.has_streamed_final_answer = False + @property + def current_prompt(self): + if self.prompt_sequence: + return self.prompt_sequence[-1] + else: + return None + def append_to_last_tokens(self, token: str) -> None: self.last_tokens.append(token) self.last_tokens_stripped.append(token.strip()) @@ -145,12 +185,10 @@ def start_stream(self): if author in IGNORE_LIST: return - self.pop_prompt() - prompt = self.consume_last_prompt() parent_id = self.get_last_message().parent_id self.stream = self.create_message( - prompt=prompt, author=author, parent_id=parent_id + prompt=self.current_prompt, author=author, parent_id=parent_id ) def end_stream(self): @@ -163,19 +201,6 @@ def pop_sequence(self): if self.sequence: return self.sequence.pop() - def add_prompt(self, prompt: str, llm_settings: Optional[LLMSettings] = None): - self.prompts.append(prompt) - self.llm_settings = llm_settings - - def pop_prompt(self): - if self.prompts: - self.last_prompt = self.prompts.pop() - - def consume_last_prompt(self): - last_prompt = self.last_prompt - self.last_prompt = None - return last_prompt - def get_author(self): if self.sequence: return self.sequence[-1].author @@ -191,12 +216,12 @@ def create_error(self, error: Exception): if isinstance(error, InterruptedError): return None - return ErrorMessage(str(error), author=self.get_author()) + return ErrorMessage(content=str(error), author=self.get_author()) def create_message( self, content: str = "", - prompt: Optional[str] = None, + prompt: Optional[Prompt] = None, author: Optional[str] = None, parent_id: Optional[str] = None, ): @@ -209,7 +234,69 @@ def create_message( author=author or self.get_author(), prompt=prompt, parent_id=parent_id, - llm_settings=self.llm_settings, + ) + + +def _on_chat_model_start( + self: BaseLangchainCallbackHandler, + serialized: Dict[str, Any], + messages: List[List[BaseMessage]], + **kwargs: Any, +): + invocation_params = kwargs.get("invocation_params") + provider, settings = get_llm_settings(invocation_params) + + if self.current_prompt: + self.current_prompt.provider = provider + self.current_prompt.settings = settings + if self.current_prompt.messages: + for idx, m in enumerate(messages[0]): + self.current_prompt.messages[idx].formatted = m.content + self.current_prompt.messages[idx].role = convert_role(m.type) + + elif self.current_prompt.template: + unique_message = messages[0][0] + prompt_message = PromptMessage( + template=self.current_prompt.template, + formatted=unique_message.content, + role=convert_role(unique_message.type), + ) + self.current_prompt.messages = [prompt_message] + self.current_prompt.template = None + else: + prompt_messages = [ + PromptMessage(formatted=m.content, role=convert_role(m.type)) + for m in messages[0] + ] + self.prompt_sequence.append( + Prompt( + messages=prompt_messages, + provider=provider, + settings=settings, + ) + ) + + +def _on_llm_start( + self: BaseLangchainCallbackHandler, + serialized: Dict[str, Any], + prompts: List[str], + **kwargs: Any, +) -> None: + invocation_params = kwargs.get("invocation_params") + provider, settings = get_llm_settings(invocation_params) + + if self.current_prompt: + self.current_prompt.formatted = prompts[0] + self.current_prompt.provider = provider + self.current_prompt.settings = settings + else: + self.prompt_sequence.append( + Prompt( + formatted=prompts[0], + provider=provider, + settings=settings, + ) ) @@ -245,9 +332,7 @@ def add_message(self, message: Message): def on_llm_start( self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any ) -> None: - invocation_params = kwargs.get("invocation_params") - llm_settings = get_llm_settings(invocation_params) - self.add_prompt(prompts[0], llm_settings) + _on_llm_start(self, serialized, prompts, **kwargs) def on_chat_model_start( self, @@ -255,10 +340,7 @@ def on_chat_model_start( messages: List[List[BaseMessage]], **kwargs: Any, ) -> None: - invocation_params = kwargs.get("invocation_params") - llm_settings = get_llm_settings(invocation_params) - prompt = "\n".join([m.content for m in messages[0]]) - self.add_prompt(prompt, llm_settings) + _on_chat_model_start(self, serialized, messages, **kwargs) def on_llm_new_token(self, token: str, **kwargs: Any) -> None: if not self.stream: @@ -278,7 +360,6 @@ def on_llm_new_token(self, token: str, **kwargs: Any) -> None: self.answer_reached = self.check_if_answer_reached() def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - self.pop_prompt() if response.llm_output is not None: if "token_usage" in response.llm_output: token_usage = response.llm_output["token_usage"] @@ -286,12 +367,17 @@ def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: run_sync( context.emitter.update_token_count(token_usage["total_tokens"]) ) + if self.current_prompt: + self.current_prompt.completion = response.generations[0][0].text if self.final_stream: run_sync(self.final_stream.send()) def on_chain_start( self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any ) -> None: + prompt = build_prompt(serialized, inputs) + if prompt: + self.prompt_sequence.append(prompt) message = self.create_message(author=serialized["id"][-1]) self.add_in_sequence(message) self.add_message(message) @@ -299,12 +385,14 @@ def on_chain_start( def on_chain_end(self, outputs: Dict[str, Any], **kwargs: Any) -> None: output_key = list(outputs.keys())[0] if output_key: - prompt = self.consume_last_prompt() parent_id = self.get_last_message().parent_id message = self.create_message( - outputs[output_key], prompt, parent_id=parent_id + outputs[output_key], self.current_prompt, parent_id=parent_id ) self.add_message(message) + + if self.prompt_sequence: + self.prompt_sequence.pop() self.pop_sequence() def on_tool_start( @@ -321,9 +409,8 @@ def on_tool_end( llm_prefix: Optional[str] = None, **kwargs: Any, ) -> None: - prompt = self.consume_last_prompt() parent_id = self.get_last_message().parent_id - message = self.create_message(output, prompt, parent_id=parent_id) + message = self.create_message(output, None, parent_id=parent_id) self.add_message(message) self.pop_sequence() @@ -370,9 +457,7 @@ async def add_message(self, message: Message): async def on_llm_start( self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any ) -> None: - invocation_params = kwargs.get("invocation_params") - llm_settings = get_llm_settings(invocation_params) - self.add_prompt(prompts[0], llm_settings) + _on_llm_start(self, serialized, prompts, **kwargs) async def on_chat_model_start( self, @@ -380,10 +465,7 @@ async def on_chat_model_start( messages: List[List[BaseMessage]], **kwargs: Any, ) -> None: - invocation_params = kwargs.get("invocation_params") - llm_settings = get_llm_settings(invocation_params) - prompt = "\n".join([m.content for m in messages[0]]) - self.add_prompt(prompt, llm_settings) + _on_chat_model_start(self, serialized, messages, **kwargs) async def on_llm_new_token(self, token: str, **kwargs: Any) -> None: if not self.stream: @@ -403,7 +485,6 @@ async def on_llm_new_token(self, token: str, **kwargs: Any) -> None: self.answer_reached = self.check_if_answer_reached() async def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - self.pop_prompt() if response.llm_output is not None: if "token_usage" in response.llm_output: token_usage = response.llm_output["token_usage"] @@ -411,12 +492,17 @@ async def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: await context.emitter.update_token_count( token_usage["total_tokens"] ) + if self.current_prompt: + self.current_prompt.completion = response.generations[0][0].text if self.final_stream: await self.final_stream.send() async def on_chain_start( self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any ) -> None: + prompt = build_prompt(serialized, inputs) + if prompt: + self.prompt_sequence.append(prompt) message = self.create_message(author=serialized["id"][-1]) self.add_in_sequence(message) await self.add_message(message) @@ -424,12 +510,13 @@ async def on_chain_start( async def on_chain_end(self, outputs: Dict[str, Any], **kwargs: Any) -> None: output_key = list(outputs.keys())[0] if output_key: - prompt = self.consume_last_prompt() parent_id = self.get_last_message().parent_id message = self.create_message( - outputs[output_key], prompt, parent_id=parent_id + outputs[output_key], prompt=self.current_prompt, parent_id=parent_id ) await self.add_message(message) + if self.prompt_sequence: + self.prompt_sequence.pop() self.pop_sequence() async def on_tool_start( @@ -446,9 +533,8 @@ async def on_tool_end( llm_prefix: Optional[str] = None, **kwargs: Any, ) -> None: - prompt = self.consume_last_prompt() parent_id = self.get_last_message().parent_id - message = self.create_message(output, prompt, parent_id=parent_id) + message = self.create_message(output, parent_id=parent_id) await self.add_message(message) self.pop_sequence() diff --git a/src/chainlit/llama_index/callbacks.py b/src/chainlit/llama_index/callbacks.py index 8256ba8170..497804bbd1 100644 --- a/src/chainlit/llama_index/callbacks.py +++ b/src/chainlit/llama_index/callbacks.py @@ -2,11 +2,12 @@ from llama_index.callbacks.base import BaseCallbackHandler from llama_index.callbacks.schema import CBEventType, EventPayload -from llama_index.llms.base import ChatResponse +from llama_index.llms.base import ChatMessage, ChatResponse, CompletionResponse from chainlit.context import context_var from chainlit.element import Text from chainlit.message import Message +from chainlit.prompt import Prompt, PromptMessage from chainlit.sync import run_sync DEFAULT_IGNORE = [ @@ -97,15 +98,37 @@ def on_event_end( ) if event_type == CBEventType.LLM: + formatted_messages = payload.get( + EventPayload.MESSAGES + ) # type: Optional[List[ChatMessage]] + formatted_prompt = payload.get(EventPayload.PROMPT) response = payload.get(EventPayload.RESPONSE) - content = response.message.content if response else "" + + if formatted_messages: + messages = [ + PromptMessage(role=m.role.value, formatted=m.content) + for m in formatted_messages + ] + else: + messages = None + + if isinstance(response, ChatResponse): + content = response.message.content or "" + elif isinstance(response, CompletionResponse): + content = response.text + else: + content = "" run_sync( Message( content=content, author=event_type, parent_id=self._get_parent_id(), - prompt=payload.get(EventPayload.PROMPT), + prompt=Prompt( + formatted=formatted_prompt, + messages=messages, + completion=content, + ), ).send() ) diff --git a/src/chainlit/message.py b/src/chainlit/message.py index 62ac84d3c6..c44f014fc6 100644 --- a/src/chainlit/message.py +++ b/src/chainlit/message.py @@ -9,14 +9,9 @@ from chainlit.context import context from chainlit.element import ElementBased from chainlit.logger import logger +from chainlit.prompt import Prompt from chainlit.telemetry import trace_event -from chainlit.types import ( - AskFileResponse, - AskFileSpec, - AskResponse, - AskSpec, - LLMSettings, -) +from chainlit.types import AskFileResponse, AskFileSpec, AskResponse, AskSpec class MessageBase(ABC): @@ -132,8 +127,7 @@ class Message(MessageBase): Args: content (str): The content of the message. author (str, optional): The author of the message, this will be used in the UI. Defaults to the chatbot name (see config). - prompt (str, optional): The prompt used to generate the message. If provided, enables the prompt playground for this message. - llm_settings (LLMSettings, optional): Settings of the LLM used to generate the prompt. This is useful for debug purposes in the prompt playground. + prompt (Prompt, optional): The prompt used to generate the message. If provided, enables the prompt playground for this message. language (str, optional): Language of the code is the content is code. See https://react-code-blocks-rajinwonderland.vercel.app/?path=/story/codeblock--supported-languages for a list of supported languages. parent_id (str, optional): If provided, the message will be nested inside the parent in the UI. indent (int, optional): If positive, the message will be nested in the UI. (deprecated, use parent_id instead) @@ -145,8 +139,7 @@ def __init__( self, content: str, author: str = config.ui.name, - prompt: Optional[str] = None, - llm_settings: Optional[LLMSettings] = None, + prompt: Optional[Prompt] = None, language: Optional[str] = None, parent_id: Optional[str] = None, indent: int = 0, @@ -161,13 +154,6 @@ def __init__( self.indent = indent self.actions = actions if actions is not None else [] self.elements = elements if elements is not None else [] - self.llm_settings = None - - if llm_settings is None and prompt is not None: - self.llm_settings = LLMSettings().to_dict() - - if llm_settings: - self.llm_settings = llm_settings.to_dict() super().__post_init__() @@ -186,8 +172,6 @@ def from_dict(self, _dict: MessageDict): message.id = _id if created_at := _dict.get("createdAt"): message.created_at = created_at - if llm_settings := _dict.get("llmSettings"): - message.llm_settings = llm_settings return message @@ -196,13 +180,14 @@ def to_dict(self): "createdAt": self.created_at, "content": self.content, "author": self.author, - "prompt": self.prompt, - "llmSettings": self.llm_settings, "language": self.language, "parentId": self.parent_id, "indent": self.indent, } + if self.prompt: + _dict["prompt"] = self.prompt.to_dict() + if self.id: _dict["id"] = self.id diff --git a/src/chainlit/playground/__init__.py b/src/chainlit/playground/__init__.py new file mode 100644 index 0000000000..b39502cb65 --- /dev/null +++ b/src/chainlit/playground/__init__.py @@ -0,0 +1,2 @@ +from .config import add_llm_provider, get_llm_providers +from .provider import * diff --git a/src/chainlit/playground/config.py b/src/chainlit/playground/config.py new file mode 100644 index 0000000000..d42efdff42 --- /dev/null +++ b/src/chainlit/playground/config.py @@ -0,0 +1,35 @@ +from typing import List + +from chainlit.playground.provider import BaseProvider +from chainlit.playground.providers import ( + Anthropic, + AzureChatOpenAI, + AzureOpenAI, + ChatOpenAI, + HFFlanT5, + OpenAI, +) + +providers = [] # type: List[BaseProvider] +default_providers = [ + AzureChatOpenAI, + AzureOpenAI, + ChatOpenAI, + OpenAI, + Anthropic, + HFFlanT5, +] # type: List[BaseProvider] + + +def add_llm_provider(provider: BaseProvider): + if not provider.is_configured(): + raise ValueError( + f"{provider.name} LLM provider requires the following environment variables: {', '.join(provider.env_vars.values())}" + ) + providers.append(provider) + + +def get_llm_providers(): + list = default_providers if len(providers) == 0 else providers + + return [provider for provider in list if provider.is_configured()] diff --git a/src/chainlit/playground/provider.py b/src/chainlit/playground/provider.py new file mode 100644 index 0000000000..b7714c1700 --- /dev/null +++ b/src/chainlit/playground/provider.py @@ -0,0 +1,123 @@ +import os +from typing import Any, Dict, List, Union + +from fastapi import HTTPException +from pydantic.dataclasses import dataclass + +from chainlit import input_widget +from chainlit.config import config +from chainlit.prompt import Prompt, PromptMessage +from chainlit.telemetry import trace_event +from chainlit.types import CompletionRequest + + +@dataclass +class BaseProvider: + id: str + name: str + env_vars: Dict[str, str] + inputs: List[input_widget.InputWidget] + is_chat: bool + + # Format the message based on the template provided + def format_message(self, message: PromptMessage, prompt: Prompt): + if message.template: + message.formatted = self._format_template(message.template, prompt) + return message + + # Convert the message to string format + def message_to_string(self, message: PromptMessage): + return message.formatted + + # Concatenate multiple messages with a joiner + def concatenate_messages(self, messages: List[PromptMessage], joiner="\n\n"): + return joiner.join([self.message_to_string(m) for m in messages]) + + # Format the template based on the prompt inputs + def _format_template(self, template: str, prompt: Prompt): + if prompt.template_format == "f-string": + return template.format(**(prompt.inputs or {})) + raise HTTPException( + status_code=422, detail=f"Unsupported format {prompt.template_format}" + ) + + # Create a prompt based on the request + def create_prompt(self, request: CompletionRequest): + prompt = request.prompt + if prompt.messages: + messages = [self.format_message(m, prompt=prompt) for m in prompt.messages] + else: + messages = None + + if self.is_chat: + if messages: + return messages + elif prompt.template or prompt.formatted: + return [ + self.format_message( + PromptMessage( + template=prompt.template, + formatted=prompt.formatted, + role="user", + ), + prompt=prompt, + ) + ] + else: + raise HTTPException(status_code=422, detail="Could not create prompt") + else: + if prompt.template: + return self._format_template(prompt.template, prompt=prompt) + elif messages: + return self.concatenate_messages(messages) + elif prompt.formatted: + return prompt.formatted + else: + raise HTTPException(status_code=422, detail="Could not create prompt") + + # Create a completion event + async def create_completion(self, request: CompletionRequest): + trace_event("completion") + + # Get the environment variable based on the request + def get_var(self, request: CompletionRequest, var: str) -> Union[str, None]: + user_env = config.project.user_env or [] + + if var in user_env: + return request.userEnv.get(var) + else: + return os.environ.get(var) + + # Check if the environment variable is available + def _is_env_var_available(self, var: str) -> bool: + user_env = config.project.user_env or [] + return var in os.environ or var in user_env + + # Check if the provider is configured + def is_configured(self): + for var in self.env_vars.values(): + if not self._is_env_var_available(var): + return False + return True + + # Validate the environment variables in the request + def validate_env(self, request: CompletionRequest): + return {k: self.get_var(request, v) for k, v in self.env_vars.items()} + + # Check if the required settings are present + def require_settings(self, settings: Dict[str, Any]): + for _input in self.inputs: + if _input.id not in settings: + raise HTTPException( + status_code=422, + detail=f"Field {_input.id} is a required setting but is not found.", + ) + + # Convert the provider to dictionary format + def to_dict(self): + return { + "id": self.id, + "name": self.name, + "inputs": [input_widget.to_dict() for input_widget in self.inputs], + "is_chat": self.is_chat, + } diff --git a/src/chainlit/playground/providers/__init__.py b/src/chainlit/playground/providers/__init__.py new file mode 100644 index 0000000000..1c4157ef70 --- /dev/null +++ b/src/chainlit/playground/providers/__init__.py @@ -0,0 +1,3 @@ +from .anthropic import Anthropic +from .huggingface import HFFlanT5 +from .openai import AzureChatOpenAI, AzureOpenAI, ChatOpenAI, OpenAI diff --git a/src/chainlit/playground/providers/anthropic.py b/src/chainlit/playground/providers/anthropic.py new file mode 100644 index 0000000000..d124131c4e --- /dev/null +++ b/src/chainlit/playground/providers/anthropic.py @@ -0,0 +1,115 @@ +from fastapi import HTTPException +from fastapi.responses import StreamingResponse + +from chainlit.input_widget import Select, Slider, Tags +from chainlit.playground.provider import BaseProvider +from chainlit.prompt import PromptMessage + + +class AnthropicProvider(BaseProvider): + def message_to_string(self, message: PromptMessage) -> str: + import anthropic + + if message.role == "user": + message_text = f"{anthropic.HUMAN_PROMPT} {message.formatted}" + elif message.role == "assistant": + message_text = f"{anthropic.AI_PROMPT} {message.formatted}" + elif message.role == "system": + message_text = ( + f"{anthropic.HUMAN_PROMPT} {message.formatted}" + ) + else: + raise HTTPException(status_code=400, detail=f"Got unknown type {message}") + return message_text + + async def create_completion(self, request): + await super().create_completion(request) + import anthropic + + env_settings = self.validate_env(request=request) + + llm_settings = request.prompt.settings + self.require_settings(llm_settings) + + prompt = self.concatenate_messages(self.create_prompt(request), joiner="") + + if not prompt.endswith(anthropic.AI_PROMPT): + prompt += anthropic.AI_PROMPT + + client = anthropic.AsyncAnthropic(**env_settings) + + llm_settings["stream"] = True + + try: + stream = await client.completions.create(prompt=prompt, **llm_settings) + except anthropic.APIConnectionError as e: + raise HTTPException( + status_code=503, + detail=e.__cause__, + ) + except anthropic.RateLimitError as e: + raise HTTPException( + status_code=429, + ) + except anthropic.APIStatusError as e: + raise HTTPException(status_code=e.status_code, detail=e.response) + + async def create_event_stream(): + async for data in stream: + token = data.completion + yield token + + return StreamingResponse(create_event_stream()) + + +Anthropic = AnthropicProvider( + id="anthropic-chat", + name="Anthropic", + env_vars={"api_key": "ANTHROPIC_API_KEY"}, + inputs=[ + Select( + id="model", + label="Model", + values=["claude-2", "claude-instant-1"], + initial_value="claude-2", + ), + Slider( + id="max_tokens_to_sample", + label="Max Tokens To Sample", + min=1.0, + max=100000, + step=1.0, + initial=1000, + ), + Tags( + id="stop_sequences", + label="Stop Sequences", + initial=[], + ), + Slider( + id="temperature", + label="Temperature", + min=0.0, + max=1.0, + step=0.01, + initial=1, + ), + Slider( + id="top_p", + label="Top P", + min=0.0, + max=1.0, + step=0.01, + initial=0.7, + ), + Slider( + id="top_k", + label="Top K", + min=0.0, + max=2048.0, + step=1.0, + initial=0, + ), + ], + is_chat=True, +) diff --git a/src/chainlit/playground/providers/huggingface.py b/src/chainlit/playground/providers/huggingface.py new file mode 100644 index 0000000000..aa181ae157 --- /dev/null +++ b/src/chainlit/playground/providers/huggingface.py @@ -0,0 +1,74 @@ +from fastapi import HTTPException +from fastapi.responses import StreamingResponse +from pydantic.dataclasses import dataclass + +from chainlit.input_widget import Slider +from chainlit.playground.provider import BaseProvider +from chainlit.sync import make_async + + +@dataclass +class BaseHuggingFaceProvider(BaseProvider): + repo_id: str + task = "text2text-generation" + + async def create_completion(self, request): + await super().create_completion(request) + from huggingface_hub.inference_api import InferenceApi + + env_settings = self.validate_env(request=request) + llm_settings = request.prompt.settings + self.require_settings(llm_settings) + + client = InferenceApi( + repo_id=self.repo_id, + token=env_settings["api_token"], + task=self.task, + ) + + prompt = self.create_prompt(request) + + response = await make_async(client)(inputs=prompt, params=llm_settings) + + if "error" in response: + raise HTTPException( + status_code=500, + detail=f"Error raised by inference API: {response['error']}", + ) + if client.task == "text2text-generation": + + def create_event_stream(): + yield response[0]["generated_text"] + + return StreamingResponse(create_event_stream()) + else: + raise HTTPException(status_code=400, detail="Unsupported task") + + +flan_hf_env_vars = {"api_token": "HUGGINGFACE_API_TOKEN"} + +HFFlanT5 = BaseHuggingFaceProvider( + id="huggingface_hub", + repo_id="declare-lab/flan-alpaca-large", + name="Flan Alpaca Large", + env_vars=flan_hf_env_vars, + inputs=[ + Slider( + id="temperature", + label="Temperature", + min=0.0, + max=1.0, + step=0.01, + initial=0.9, + ), + Slider( + id="max_length", + label="Completion max length", + min=1.0, + max=5000, + step=1.0, + initial=256, + ), + ], + is_chat=False, +) diff --git a/src/chainlit/playground/providers/openai.py b/src/chainlit/playground/providers/openai.py new file mode 100644 index 0000000000..058d91f58d --- /dev/null +++ b/src/chainlit/playground/providers/openai.py @@ -0,0 +1,254 @@ +from contextlib import contextmanager + +from fastapi import HTTPException +from fastapi.responses import StreamingResponse + +from chainlit.input_widget import Select, Slider, Tags +from chainlit.playground.provider import BaseProvider + +openai_common_inputs = [ + Slider( + id="temperature", + label="Temperature", + min=0.0, + max=1.0, + step=0.01, + initial=0.9, + ), + Slider( + id="max_tokens", + label="Max Tokens", + min=0.0, + max=8000, + step=1, + initial=256, + ), + Slider(id="top_p", label="Top P", min=0.0, max=1.0, step=0.01, initial=1.0), + Slider( + id="frequency_penalty", + label="Frequency Penalty", + min=0.0, + max=1.0, + step=0.01, + initial=0.0, + ), + Slider( + id="presence_penalty", + label="Presence Penalty", + min=0.0, + max=1.0, + step=0.01, + initial=0.0, + ), + Tags(id="stop", label="Stop Sequences", initial=[]), +] + + +@contextmanager +def handle_openai_error(): + import openai + + try: + yield + except openai.error.Timeout as e: + raise HTTPException( + status_code=408, + detail=f"OpenAI API request timed out: {e}", + ) + except openai.error.APIError as e: + raise HTTPException( + status_code=500, + detail=f"OpenAI API returned an API Error: {e}", + ) + except openai.error.APIConnectionError as e: + raise HTTPException( + status_code=503, + detail=f"OpenAI API request failed to connect: {e}", + ) + except openai.error.InvalidRequestError as e: + raise HTTPException( + status_code=400, + detail=f"OpenAI API request was invalid: {e}", + ) + except openai.error.AuthenticationError as e: + raise HTTPException( + status_code=401, + detail=f"OpenAI API request was not authorized: {e}", + ) + except openai.error.PermissionError as e: + raise HTTPException( + status_code=403, + detail=f"OpenAI API request was not permitted: {e}", + ) + except openai.error.RateLimitError as e: + raise HTTPException( + status_code=429, + detail=f"OpenAI API request exceeded rate limit: {e}", + ) + + +class ChatOpenAIProvider(BaseProvider): + def format_message(self, message, prompt): + message = super().format_message(message, prompt) + return message.to_openai() + + async def create_completion(self, request): + await super().create_completion(request) + import openai + + env_settings = self.validate_env(request=request) + + deployment_id = self.get_var(request, "OPENAI_API_DEPLOYMENT_ID") + + if deployment_id: + env_settings["deployment_id"] = deployment_id + + llm_settings = request.prompt.settings + + self.require_settings(llm_settings) + + messages = self.create_prompt(request) + + stop = llm_settings["stop"] + + # OpenAI doesn't support an empty stop array, clear it + if isinstance(stop, list) and len(stop) == 0: + stop = None + + llm_settings["stop"] = stop + + llm_settings["stream"] = True + + with handle_openai_error(): + response = await openai.ChatCompletion.acreate( + **env_settings, + messages=messages, + **llm_settings, + ) + + async def create_event_stream(): + async for stream_resp in response: + token = stream_resp.choices[0]["delta"].get("content", "") + yield token + + return StreamingResponse(create_event_stream()) + + +class OpenAIProvider(BaseProvider): + def message_to_string(self, message): + return message.to_string() + + async def create_completion(self, request): + await super().create_completion(request) + import openai + + env_settings = self.validate_env(request=request) + + deployment_id = self.get_var(request, "OPENAI_API_DEPLOYMENT_ID") + + if deployment_id: + env_settings["deployment_id"] = deployment_id + + llm_settings = request.prompt.settings + + self.require_settings(llm_settings) + + prompt = self.create_prompt(request) + stop = llm_settings["stop"] + + # OpenAI doesn't support an empty stop array, clear it + if isinstance(stop, list) and len(stop) == 0: + stop = None + + llm_settings["stop"] = stop + + llm_settings["stream"] = True + + with handle_openai_error(): + response = await openai.Completion.acreate( + **env_settings, + prompt=prompt, + **llm_settings, + ) + + async def create_event_stream(): + async for stream_resp in response: + token = stream_resp.get("choices")[0].get("text") + yield token + + return StreamingResponse(create_event_stream()) + + +openai_env_vars = {"api_key": "OPENAI_API_KEY"} + +azure_openai_env_vars = { + "api_key": "OPENAI_API_KEY", + "api_type": "OPENAI_API_TYPE", + "api_base": "OPENAI_API_BASE", + "api_version": "OPENAI_API_VERSION", +} + +ChatOpenAI = ChatOpenAIProvider( + id="openai-chat", + env_vars=openai_env_vars, + name="ChatOpenAI", + inputs=[ + Select( + id="model", + label="Model", + values=["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt4"], + initial_value="gpt-3.5-turbo", + ), + *openai_common_inputs, + ], + is_chat=True, +) + + +AzureChatOpenAI = ChatOpenAIProvider( + id="azure-openai-chat", + env_vars=azure_openai_env_vars, + name="AzureChatOpenAI", + inputs=[ + Select( + id="model", + label="Model", + values=["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt4"], + initial_value="gpt-3.5-turbo", + ), + *openai_common_inputs, + ], + is_chat=True, +) + +OpenAI = OpenAIProvider( + id="openai", + name="OpenAI", + env_vars=openai_env_vars, + inputs=[ + Select( + id="model", + label="Model", + values=["text-davinci-003", "text-davinci-002"], + initial_value="text-davinci-003", + ), + *openai_common_inputs, + ], + is_chat=False, +) + +AzureOpenAI = OpenAIProvider( + id="azure", + name="AzureOpenAI", + env_vars=azure_openai_env_vars, + inputs=[ + Select( + id="model", + label="Model", + values=["text-davinci-003", "text-davinci-002"], + initial_value="text-davinci-003", + ), + *openai_common_inputs, + ], + is_chat=False, +) diff --git a/src/chainlit/prompt.py b/src/chainlit/prompt.py new file mode 100644 index 0000000000..42d40b1f58 --- /dev/null +++ b/src/chainlit/prompt.py @@ -0,0 +1,32 @@ +from typing import Any, Dict, List, Literal, Optional + +from dataclasses_json import DataClassJsonMixin +from pydantic.dataclasses import dataclass + + +@dataclass +class BaseTemplate(DataClassJsonMixin): + template: Optional[str] = None + formatted: Optional[str] = None + template_format: Optional[str] = "f-string" + + +@dataclass +class PromptMessage(BaseTemplate): + role: Optional[Literal["system", "assistant", "user", "function"]] = None + + def to_openai(self): + return {"role": self.role, "content": self.formatted} + + def to_string(self): + return f"{self.role}: {self.formatted}" + + +@dataclass +class Prompt(BaseTemplate): + provider: Optional[str] = None + id: Optional[str] = None + inputs: Optional[Dict[str, str]] = None + completion: Optional[str] = None + settings: Optional[Dict[str, Any]] = None + messages: Optional[List[PromptMessage]] = None diff --git a/src/chainlit/server.py b/src/chainlit/server.py index b8b08a07db..90be53cf37 100644 --- a/src/chainlit/server.py +++ b/src/chainlit/server.py @@ -29,7 +29,7 @@ from chainlit.config import DEFAULT_HOST, config, load_module, reload_config from chainlit.logger import logger from chainlit.markdown import get_markdown_str -from chainlit.telemetry import trace_event +from chainlit.playground.config import get_llm_providers from chainlit.types import ( CompletionRequest, DeleteConversationRequest, @@ -185,39 +185,30 @@ def get_html_template(): @app.post("/completion") -async def completion(completion: CompletionRequest): +async def completion(request: CompletionRequest): """Handle a completion request from the prompt playground.""" - import openai + providers = get_llm_providers() - trace_event("completion") + try: + provider = [p for p in providers if p.id == request.prompt.provider][0] + except IndexError: + raise HTTPException( + status_code=404, + detail=f"LLM provider '{request.prompt.provider}' not found", + ) - api_key = completion.userEnv.get("OPENAI_API_KEY", os.environ.get("OPENAI_API_KEY")) + response = await provider.create_completion(request) - model_name = completion.settings.model_name - stop = completion.settings.stop - # OpenAI doesn't support an empty stop array, clear it - if isinstance(stop, list) and len(stop) == 0: - stop = None + return response - if model_name in ["gpt-3.5-turbo", "gpt-4"]: - response = await openai.ChatCompletion.acreate( - api_key=api_key, - model=model_name, - messages=[{"role": "user", "content": completion.prompt}], - stop=stop, - **completion.settings.to_settings_dict(), - ) - return PlainTextResponse(content=response["choices"][0]["message"]["content"]) - else: - response = await openai.Completion.acreate( - api_key=api_key, - model=model_name, - prompt=completion.prompt, - stop=stop, - **completion.settings.to_settings_dict(), - ) - return PlainTextResponse(content=response["choices"][0]["text"]) + +@app.get("/project/llm-providers") +async def get_providers(): + """List the providers.""" + providers = get_llm_providers() + providers = [p.to_dict() for p in providers] + return JSONResponse(content={"providers": providers}) @app.get("/project/settings") diff --git a/src/chainlit/types.py b/src/chainlit/types.py index 76aebc0efb..81a43263a7 100644 --- a/src/chainlit/types.py +++ b/src/chainlit/types.py @@ -4,6 +4,8 @@ from pydantic import BaseModel from pydantic.dataclasses import dataclass +from chainlit.prompt import Prompt + InputWidgetType = Literal["switch", "slider", "select", "textinput", "tags"] ElementType = Literal[ "image", "avatar", "text", "pdf", "tasklist", "audio", "video", "file" @@ -43,30 +45,9 @@ class AskFileResponse: content: bytes -@dataclass -class LLMSettings(DataClassJsonMixin): - model_name: str = "text-davinci-003" - stop: Optional[List[str]] = None - temperature: float = 0 - max_tokens: int = 256 - top_p: int = 1 - frequency_penalty: int = 0 - presence_penalty: int = 0 - - def to_settings_dict(self): - return { - "temperature": self.temperature, - "max_tokens": self.max_tokens, - "top_p": self.top_p, - "frequency_penalty": self.frequency_penalty, - "presence_penalty": self.presence_penalty, - } - - class CompletionRequest(BaseModel): - prompt: str + prompt: Prompt userEnv: Dict[str, str] - settings: LLMSettings class UpdateFeedbackRequest(BaseModel): diff --git a/src/pyproject.toml b/src/pyproject.toml index 224b2e815e..1326d1169e 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -30,7 +30,6 @@ syncer = "^2.0.3" asyncer = "^0.0.2" nest-asyncio = "^1.5.6" click = "^8.1.3" -openai = "^0.27.7" tomli = "^2.0.1" pydantic = "^1.10.8" python-graphql-client = "^0.4.3" @@ -46,8 +45,9 @@ lazify = "^0.4.0" optional = true [tool.poetry.group.tests.dependencies] +openai = "^0.27.7" langchain = "^0.0.262" -llama_index = "^0.8.3" +llama-index = "^0.8.3" transformers = "^4.30.1" responses = "0.23.1" aioresponses = "0.7.4" @@ -67,6 +67,8 @@ python_version = "3.8" [[tool.mypy.overrides]] module = [ + "anthropic", + "huggingface_hub.inference_api", "fastapi_socketio", "filetype", "haystack.*",